]> git.e2factory.org Git - e2factory.git/commitdiff
cscache: weed out temporary files and reduce entries
authorTobias Ulmer <tu@emlix.com>
Thu, 5 Jan 2017 19:05:56 +0000 (20:05 +0100)
committerTobias Ulmer <tu@emlix.com>
Thu, 5 Jan 2017 19:05:56 +0000 (20:05 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
local/cscache.lua

index f06ed9150b26119bc403724049bb62f65de79beb..8dd3f12bbb278c6b168db8748c97fd2462f76b3e 100644 (file)
@@ -249,7 +249,9 @@ function cs_cache_class:store_cache()
 
     hcachevec = {}
     for path,hce in pairs(self._csdict) do
-        table.insert(hcachevec, {path=path, hce=hce})
+        if not path:find("/e2tmp.", 1, true) then -- weed out temp files
+            table.insert(hcachevec, {path=path, hce=hce})
+        end
     end
 
     local function comp(t1, t2)
@@ -271,7 +273,7 @@ function cs_cache_class:store_cache()
             v.hce.mtime_nsec, v.hce.ctime, v.hce.ctime_nsec, v.hce.size,
             v.hce.dev, v.hce.ino, v.hce.use))
 
-            if i > 10000 then
+            if i > 1000 then
                 break
             end
     end