示例#1
0
 /**
  * Delete outdated cache entries
  */
 public function expunge_cache()
 {
     if ($this->mcache) {
         $ttl = rcube::get_instance()->config->get('message_cache_lifetime', '10d');
         $this->mcache->expunge($ttl);
     }
     if ($this->cache) {
         $this->cache->expunge();
     }
 }
示例#2
0
 /**
  * Enable or disable indexes caching
  *
  * @param string $type Cache type (@see rcube::get_cache)
  */
 public function set_caching($type)
 {
     if ($type) {
         $this->caching = $type;
     } else {
         if ($this->cache) {
             $this->cache->close();
         }
         $this->cache = null;
         $this->caching = false;
     }
 }
示例#3
0
 /**
  * Garbage collector - cache/temp cleaner
  */
 public function gc()
 {
     rcube_cache::gc();
     rcube_cache_shared::gc();
     $this->get_storage()->cache_gc();
     $this->gc_temp();
 }