resolve merge conflict

This commit is contained in:
Max Kostikov
2019-11-25 21:50:02 +01:00
committed by Mario
parent 004861fbb7
commit 63aa3948e5
3 changed files with 10 additions and 9 deletions

View File

@@ -11,8 +11,10 @@ class Cache {
$hash = hash('whirlpool',$key);
$r = q("SELECT v FROM cache WHERE k = '%s' limit 1",
dbesc($hash)
$r = q("SELECT v FROM cache WHERE k = '%s' AND updated > %s - INTERVAL %s LIMIT 1",
dbesc($hash),
db_utcnow(),
db_quoteinterval(get_config('system','object_cache_days', '30') . ' DAY')
);
if ($r)
@@ -40,12 +42,5 @@ class Cache {
dbesc(datetime_convert()));
}
}
public static function clear() {
q("DELETE FROM cache WHERE updated < '%s'",
dbesc(datetime_convert('UTC','UTC',"now - 30 days")));
}
}