aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-01-28 17:03:05 +0000
committerMario <mario@mariovavti.com>2024-01-28 17:03:05 +0000
commit09465619e53c9c0a04ee73cecc3fc2d87ee74d55 (patch)
tree1de11b57339b770c4fffc166c0feb7fb702a4cb5 /Zotlabs/Daemon
parent390af7722df44dbfe4754f6814940d90774f5d15 (diff)
downloadvolse-hubzilla-09465619e53c9c0a04ee73cecc3fc2d87ee74d55.tar.gz
volse-hubzilla-09465619e53c9c0a04ee73cecc3fc2d87ee74d55.tar.bz2
volse-hubzilla-09465619e53c9c0a04ee73cecc3fc2d87ee74d55.zip
enable object cash by default, introduce system.cache_expire_days and default to 7, default system.default_expire_days to 30 and system.active_expire_days to 7
Diffstat (limited to 'Zotlabs/Daemon')
-rw-r--r--Zotlabs/Daemon/Cron.php4
-rw-r--r--Zotlabs/Daemon/Cron_daily.php4
-rw-r--r--Zotlabs/Daemon/Expire.php4
3 files changed, 6 insertions, 6 deletions
diff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php
index caae0ce53..e0fa2d629 100644
--- a/Zotlabs/Daemon/Cron.php
+++ b/Zotlabs/Daemon/Cron.php
@@ -124,13 +124,13 @@ class Cron {
$r = q("SELECT DISTINCT xchan, content FROM photo WHERE photo_usage = %d AND expires < %s - INTERVAL %s",
intval(PHOTO_CACHE),
db_utcnow(),
- db_quoteinterval(get_config('system', 'active_expire_days', '30') . ' DAY')
+ db_quoteinterval(get_config('system', 'cache_expire_days', 7) . ' DAY')
);
if ($r) {
q("DELETE FROM photo WHERE photo_usage = %d AND expires < %s - INTERVAL %s",
intval(PHOTO_CACHE),
db_utcnow(),
- db_quoteinterval(get_config('system', 'active_expire_days', '30') . ' DAY')
+ db_quoteinterval(get_config('system', 'cache_expire_days', 7) . ' DAY')
);
foreach ($r as $rr) {
$file = dbunescbin($rr['content']);
diff --git a/Zotlabs/Daemon/Cron_daily.php b/Zotlabs/Daemon/Cron_daily.php
index 850d38229..98379be1b 100644
--- a/Zotlabs/Daemon/Cron_daily.php
+++ b/Zotlabs/Daemon/Cron_daily.php
@@ -65,10 +65,10 @@ class Cron_daily {
}
}
- // Clean up emdedded content cache
+ // Clean up cache
q("DELETE FROM cache WHERE updated < %s - INTERVAL %s",
db_utcnow(),
- db_quoteinterval(get_config('system', 'active_expire_days', '30') . ' DAY')
+ db_quoteinterval(get_config('system', 'cache_expire_days', 7) . ' DAY')
);
//update statistics in config
diff --git a/Zotlabs/Daemon/Expire.php b/Zotlabs/Daemon/Expire.php
index 84a606dc2..6ab67150f 100644
--- a/Zotlabs/Daemon/Expire.php
+++ b/Zotlabs/Daemon/Expire.php
@@ -43,8 +43,8 @@ class Expire {
logger('expire: start with pid ' . $pid, LOGGER_DEBUG);
- $site_expire = intval(get_config('system', 'default_expire_days'));
- $commented_days = intval(get_config('system', 'active_expire_days'));
+ $site_expire = intval(get_config('system', 'default_expire_days', 30));
+ $commented_days = intval(get_config('system', 'active_expire_days', 7));
logger('site_expire: ' . $site_expire);