From 1fc81457a1e4ea93cc1db01ffac6a194ff4bc22d Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Mon, 25 Nov 2019 14:07:39 +0100 Subject: Use cached embeds for a week by default --- Zotlabs/Lib/Cache.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Zotlabs/Lib/Cache.php b/Zotlabs/Lib/Cache.php index cea075659..bda8de6f5 100644 --- a/Zotlabs/Lib/Cache.php +++ b/Zotlabs/Lib/Cache.php @@ -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', '7') . ' DAY') ); if ($r) -- cgit v1.2.3