summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcmail.php
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-05-23 13:42:55 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-05-23 13:42:55 +0000
commit246401dcfa6e811c22cf8149f2075714281c9248 (patch)
tree8ac602e2c634614b22588b7186d224c8875f46f4 /roundcubemail/program/include/rcmail.php
parentdaa65a00d6a2a76fcd457193776cb5f748bec549 (diff)
- Add read/write methods for immediate operations on cache backend (no affect in-memory cache)
- Add possibility to disable data serialization in cache git-svn-id: https://svn.roundcube.net/trunk@4803 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcmail.php')
-rw-r--r--roundcubemail/program/include/rcmail.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/roundcubemail/program/include/rcmail.php b/roundcubemail/program/include/rcmail.php
index 8198c3ef8..e93d546d6 100644
--- a/roundcubemail/program/include/rcmail.php
+++ b/roundcubemail/program/include/rcmail.php
@@ -355,16 +355,17 @@ class rcmail
/**
* Initialize and get cache object
*
- * @param string $name Cache identifier
- * @param string $type Cache type ('db', 'apc' or 'memcache')
- * @param int $ttl Expiration time for cache items in seconds
+ * @param string $name Cache identifier
+ * @param string $type Cache type ('db', 'apc' or 'memcache')
+ * @param int $ttl Expiration time for cache items in seconds
+ * @param bool $packed Enables/disables data serialization
*
* @return rcube_cache Cache object
*/
- public function get_cache($name, $type='db', $ttl=0)
+ public function get_cache($name, $type='db', $ttl=0, $packed=true)
{
if (!isset($this->caches[$name])) {
- $this->caches[$name] = new rcube_cache($type, $_SESSION['user_id'], $name, $ttl);
+ $this->caches[$name] = new rcube_cache($type, $_SESSION['user_id'], $name, $ttl, $packed);
}
return $this->caches[$name];