aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-11-25 14:07:39 +0100
committerMax Kostikov <max@kostikov.co>2019-11-25 14:07:39 +0100
commit1fc81457a1e4ea93cc1db01ffac6a194ff4bc22d (patch)
treeb9bc121e47e9bcda6953b294be8e04672d3a3220
parent53ad04cdc4bd55e4d5b182ebaca2792a81d3c75a (diff)
downloadvolse-hubzilla-1fc81457a1e4ea93cc1db01ffac6a194ff4bc22d.tar.gz
volse-hubzilla-1fc81457a1e4ea93cc1db01ffac6a194ff4bc22d.tar.bz2
volse-hubzilla-1fc81457a1e4ea93cc1db01ffac6a194ff4bc22d.zip
Use cached embeds for a week by default
-rw-r--r--Zotlabs/Lib/Cache.php6
1 files 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)