From: Gordon Hecker Date: Fri, 15 Jan 2010 16:06:50 +0000 (+0100) Subject: cache: allow disabling the cache on-the-fly for fetch_file() and push_file() by passi... X-Git-Tag: e2factory-2.3.4pre1~52 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=c33dcd1e66ef426f9fea3921597872aced4ea556;p=e2factory.git cache: allow disabling the cache on-the-fly for fetch_file() and push_file() by passing cache=false in the flags Required to allow the global tools to use the cache in the configured location. See next commit. Signed-off-by: Gordon Hecker --- diff --git a/generic/cache.lua b/generic/cache.lua index d5a28d4..52fac51 100644 --- a/generic/cache.lua +++ b/generic/cache.lua @@ -307,7 +307,7 @@ function fetch_file(cache, server, location, destdir, destname, flags) destname = e2lib.basename(location) end -- fetch the file - if ce.flags.cache then + if ce.flags.cache and flags.cache ~= false then -- cache is enabled: -- fetch from source to cache and from cache to destination rc, re = cache_file(cache, server, location, flags) @@ -355,7 +355,7 @@ function push_file(cache, sourcefile, server, location, flags) if not ce then return false, e:cat(re) end - if ce.flags.cache then + if ce.flags.cache and flags.cache ~= false then -- cache is enabled: -- push the file from source to cache and from cache to -- destination