Move memcache settings to config file.
This commit is contained in:
parent
f97fcc59d2
commit
12a3ca5009
|
@ -663,7 +663,6 @@ function groups_show($gruppen)
|
||||||
if ($found == 1) {
|
if ($found == 1) {
|
||||||
$lastarticleinfo['date'] = $row['date'];
|
$lastarticleinfo['date'] = $row['date'];
|
||||||
if ($memcacheD) {
|
if ($memcacheD) {
|
||||||
$memcache_ttl = 3600;
|
|
||||||
$memcacheD->add($lar_memcache = 'lastarticleinfo-' . $g->name, $lastarticleinfo['date'], $memcache_ttl);
|
$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) {
|
if ($ok_article == 1 && $memcacheD) {
|
||||||
$memcache_ttl = 14400;
|
|
||||||
$memcacheD->add($article_key, $msg2, $memcache_ttl);
|
$memcacheD->add($article_key, $msg2, $memcache_ttl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,12 @@ if(!$enable_memcache) {
|
||||||
$server = '127.0.0.1';
|
$server = '127.0.0.1';
|
||||||
$port = 11211;
|
$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 */
|
/* PLEASE DO NOT EDIT BELOW THIS LINE */
|
||||||
|
|
||||||
// Initiate a new object of memcache
|
// Initiate a new object of memcache
|
||||||
|
|
Loading…
Reference in New Issue