diff options
author | Max Kostikov <max@kostikov.co> | 2019-11-25 13:16:07 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-11-25 21:58:18 +0100 |
commit | 5e442396570f6ec0ec9f27f209ef9d40e95d114a (patch) | |
tree | 7814366c3942bdcd69662654a697636ca9a602f3 | |
parent | 17cd452fff337166b1ec3b974379c2dd62151d87 (diff) | |
download | volse-hubzilla-5e442396570f6ec0ec9f27f209ef9d40e95d114a.tar.gz volse-hubzilla-5e442396570f6ec0ec9f27f209ef9d40e95d114a.tar.bz2 volse-hubzilla-5e442396570f6ec0ec9f27f209ef9d40e95d114a.zip |
Add daily cached embedded content cleanup
(cherry picked from commit 5c47c9ed9579dc97e0a508045fe50264bb96490b)
-rw-r--r-- | Zotlabs/Daemon/Cron_daily.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Zotlabs/Daemon/Cron_daily.php b/Zotlabs/Daemon/Cron_daily.php index dbfcff439..b0eefe93a 100644 --- a/Zotlabs/Daemon/Cron_daily.php +++ b/Zotlabs/Daemon/Cron_daily.php @@ -88,6 +88,12 @@ class Cron_daily { z6_discover(); call_hooks('cron_daily',datetime_convert()); + + // Clean up emdeded contect cache + q("DELETE FROM cache WHERE updated < %s - INTERVAL %s", + db_utcnow(), + db_quoteinterval(get_config('system','active_expire_days', '30') . ' DAY') + ); set_config('system','last_expire_day',intval(datetime_convert('UTC','UTC','now','d'))); |