From 38f1644efff45b7cb5c73637d7dbdaf4d98e9e46 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Thu, 5 Jan 2017 20:05:56 +0100 Subject: [PATCH] cscache: weed out temporary files and reduce entries Signed-off-by: Tobias Ulmer --- local/cscache.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.39.5