1
0
mirror of https://github.com/limosek/zaf.git synced 2024-11-13 05:59:06 +01:00

Cache now predelete content due to rights mistake

This commit is contained in:
Lukas Macura 2016-04-21 15:59:29 +02:00
parent c96a7a17dc
commit 2d9c2059fe

View File

@ -30,6 +30,7 @@ zaf_tocache(){
local expiry
key=$(zaf_cache_key "$1")
rm -f $ZAF_CACHE_DIR/$key $ZAF_CACHE_DIR/${key}.info
echo "$2" >$ZAF_CACHE_DIR/$key
echo "$1" >$ZAF_CACHE_DIR/${key}.info
expiry=$(zaf_date_add "$3")
@ -46,6 +47,7 @@ zaf_tocache_stdin(){
local expiry
key=$(zaf_cache_key "$1")
rm -f $ZAF_CACHE_DIR/$key $ZAF_CACHE_DIR/${key}.info
cat >$ZAF_CACHE_DIR/$key
if [ -s $ZAF_CACHE_DIR/$key ]; then
expiry="$(zaf_date_add $2)"