From c33dcd1e66ef426f9fea3921597872aced4ea556 Mon Sep 17 00:00:00 2001 From: Gordon Hecker Date: Fri, 15 Jan 2010 17:06:50 +0100 Subject: [PATCH] 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 --- generic/cache.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5