diff options
author | Max Kostikov <max@kostikov.co> | 2019-11-25 14:07:39 +0100 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-11-25 14:07:39 +0100 |
commit | 1fc81457a1e4ea93cc1db01ffac6a194ff4bc22d (patch) | |
tree | b9bc121e47e9bcda6953b294be8e04672d3a3220 | |
parent | 53ad04cdc4bd55e4d5b182ebaca2792a81d3c75a (diff) | |
download | volse-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.php | 6 |
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) |