summaryrefslogtreecommitdiff
path: root/program/include/rcmail.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-05-23 13:42:55 +0000
committeralecpl <alec@alec.pl>2011-05-23 13:42:55 +0000
commitc9f4e9bc659a06f6d12c21ddfba0432ccf654e99 (patch)
tree7674342dd4cb1feabdb47a88c7dbeda95c3e687c /program/include/rcmail.php
parent40a1860174c612c4d60754b328fa572a7879f1e3 (diff)
- Add read/write methods for immediate operations on cache backend (no affect in-memory cache)
- Add possibility to disable data serialization in cache
Diffstat (limited to 'program/include/rcmail.php')
-rw-r--r--program/include/rcmail.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 8198c3ef8..e93d546d6 100644
--- a/program/include/rcmail.php
+++ b/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];