aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
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/Lib
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/Lib')
-rw-r--r--Zotlabs/Lib/ASCache.php2
-rw-r--r--Zotlabs/Lib/Activity.php2
-rw-r--r--Zotlabs/Lib/ActivityStreams.php2
3 files changed, 5 insertions, 1 deletions
diff --git a/Zotlabs/Lib/ASCache.php b/Zotlabs/Lib/ASCache.php
index 63bd73ea7..4904a1d8a 100644
--- a/Zotlabs/Lib/ASCache.php
+++ b/Zotlabs/Lib/ASCache.php
@@ -8,7 +8,7 @@ namespace Zotlabs\Lib;
class ASCache {
public static function isEnabled() {
- return Config::Get('system', 'as_object_cache_enabled', false);
+ return Config::Get('system', 'as_object_cache_enabled', true);
}
public static function getAge() {
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index a225e551b..a6a194045 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -3084,9 +3084,11 @@ class Activity {
while ($current_item['parent_mid'] !== $current_item['mid']) {
$cached = ASCache::Get($current_item['parent_mid']);
if ($cached) {
+ // logger('cached: ' . $current_item['parent_mid']);
$n = unserialise($cached);
}
else {
+ // logger('fetching: ' . $current_item['parent_mid']);
$n = self::fetch($current_item['parent_mid'], $channel);
if (!$n) {
break;
diff --git a/Zotlabs/Lib/ActivityStreams.php b/Zotlabs/Lib/ActivityStreams.php
index 3749126d3..b37efdd26 100644
--- a/Zotlabs/Lib/ActivityStreams.php
+++ b/Zotlabs/Lib/ActivityStreams.php
@@ -405,9 +405,11 @@ class ActivityStreams {
if ($this->is_url($x)) {
$cached = ASCache::Get($x);
if ($cached) {
+ // logger('AS cached: ' . $x);
$y = unserialise($cached);
}
else {
+ // logger('AS fetching: ' . $x);
$y = $this->fetch_property($x);
if ($y) {
ASCache::Set($x, serialise($y));