diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/database.php | 5 | ||||
-rw-r--r-- | engine/lib/memcache.php | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/engine/lib/database.php b/engine/lib/database.php index 0e5b43106..53d987665 100644 --- a/engine/lib/database.php +++ b/engine/lib/database.php @@ -57,7 +57,10 @@ // Set up cache if (!$DB_QUERY_CACHE) - $DB_QUERY_CACHE = select_default_memcache('db_query_cache'); //array();
+ $DB_QUERY_CACHE = select_default_memcache('db_query_cache'); //array(); + + if ($DB_QUERY_CACHE instanceof ElggMemcache) + $DB_QUERY_CACHE->setDefaultExpiry(30);
}
/**
diff --git a/engine/lib/memcache.php b/engine/lib/memcache.php index c5618b71d..0b9ba917f 100644 --- a/engine/lib/memcache.php +++ b/engine/lib/memcache.php @@ -150,7 +150,7 @@ $key = $this->make_memcache_key($key); $this->keys_so_far[$key] = time(); - $this->save_persistent_keylist(); + //$this->save_persistent_keylist(); $result = $this->memcache->set($key, $data, null, $this->expires); if ((isset($CONFIG->debug)) && ($CONFIG->debug == true) && (!$result)) @@ -164,7 +164,7 @@ $key = $this->make_memcache_key($key); $this->keys_so_far[$key] = time(); - $this->save_persistent_keylist(); + //$this->save_persistent_keylist(); $result = $this->memcache->get($key); if ((isset($CONFIG->debug)) && ($CONFIG->debug == true) && (!$result)) @@ -185,13 +185,13 @@ foreach ($this->keys_so_far as $key => $ts) $this->memcache->delete($key, 0); - $this->clear_persistent_keylist(); + //$this->clear_persistent_keylist(); $this->keys_so_far = array(); return true; } - private function load_persistent_keylist() + /*private function load_persistent_keylist() { return $this->memcache->get($this->namespace.':keys_so_far'); } @@ -211,6 +211,6 @@ public function __destruct() { $this->save_persistent_keylist(); - } + }*/ } ?>
\ No newline at end of file |