From 12a3ca500959f59399c621ecdd9be672354231d7 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Wed, 8 May 2024 14:01:21 -0700 Subject: [PATCH] Move memcache settings to config file. --- Rocksolid_Light/rocksolid/newsportal.php | 2 -- Rocksolid_Light/rslight/memcached.inc.php | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Rocksolid_Light/rocksolid/newsportal.php b/Rocksolid_Light/rocksolid/newsportal.php index 95b7bce..fe8d7ab 100644 --- a/Rocksolid_Light/rocksolid/newsportal.php +++ b/Rocksolid_Light/rocksolid/newsportal.php @@ -663,7 +663,6 @@ function groups_show($gruppen) if ($found == 1) { $lastarticleinfo['date'] = $row['date']; if ($memcacheD) { - $memcache_ttl = 3600; $memcacheD->add($lar_memcache = 'lastarticleinfo-' . $g->name, $lastarticleinfo['date'], $memcache_ttl); } } @@ -1888,7 +1887,6 @@ function np_get_db_article($article, $group, $makearray = 1, $dbh = null) } } if ($ok_article == 1 && $memcacheD) { - $memcache_ttl = 14400; $memcacheD->add($article_key, $msg2, $memcache_ttl); } } diff --git a/Rocksolid_Light/rslight/memcached.inc.php b/Rocksolid_Light/rslight/memcached.inc.php index 6798fe1..17a27bd 100644 --- a/Rocksolid_Light/rslight/memcached.inc.php +++ b/Rocksolid_Light/rslight/memcached.inc.php @@ -10,6 +10,12 @@ if(!$enable_memcache) { $server = '127.0.0.1'; $port = 11211; +// Log all hits +$enable_memcache_logging = false; + +// Time in seconds to cache data +$memcache_ttl = 14400; + /* PLEASE DO NOT EDIT BELOW THIS LINE */ // Initiate a new object of memcache