From 5c47c9ed9579dc97e0a508045fe50264bb96490b Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Mon, 25 Nov 2019 14:16:07 +0100 Subject: Add daily cached embedded content cleanup --- Zotlabs/Daemon/Cron_daily.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Zotlabs') diff --git a/Zotlabs/Daemon/Cron_daily.php b/Zotlabs/Daemon/Cron_daily.php index b41625963..affb706a0 100644 --- a/Zotlabs/Daemon/Cron_daily.php +++ b/Zotlabs/Daemon/Cron_daily.php @@ -94,6 +94,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'))); -- cgit v1.2.3