cache cache status
[matrix.git] / matrix / cache.py
index 49535a7..b1172f0 100644 (file)
@@ -13,9 +13,12 @@ Error = RuntimeError
 regex = re.compile(r'([^\s]+)[\s]?([^\s]*)')
 
 def contains(c):
-       if c.from_platform:
-               return True
+       if c.cached is None:
+               c.cached = __contains(c)
 
+       return c.cached
+
+def __contains(c):
        for repo in (c.repo, c.meta):
                if repo.dirty_files():
                        if config.force: