diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-11-04 17:56:44 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-11-04 17:56:44 +0000 |
commit | a601a52eca4d5f0dad5da705f2858ff35368f605 (patch) | |
tree | e8c244da4eeb5e7f241d7a60db22cb8bd38f91e0 | |
parent | c21cf65787e4f5f3994104a90c7291eb6fc5f60a (diff) | |
download | elgg-a601a52eca4d5f0dad5da705f2858ff35368f605.tar.gz elgg-a601a52eca4d5f0dad5da705f2858ff35368f605.tar.bz2 |
More tweaks
git-svn-id: https://code.elgg.org/elgg/trunk@2400 36083f99-b078-4883-b0ff-0f9b5a30f544
-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 |