From: Tobias Ulmer Date: Thu, 5 Jan 2017 19:05:56 +0000 (+0100) Subject: cscache: weed out temporary files and reduce entries X-Git-Tag: e2factory-2.3.16rc1~5 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=38f1644efff45b7cb5c73637d7dbdaf4d98e9e46;p=e2factory.git cscache: weed out temporary files and reduce entries Signed-off-by: Tobias Ulmer --- diff --git a/local/cscache.lua b/local/cscache.lua index f06ed91..8dd3f12 100644 --- a/local/cscache.lua +++ b/local/cscache.lua @@ -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