roundcubemail/program/lib/Roundcube/rcube.php
public function get_cache($name, $type='db', $ttl=0, $packed=true)
    {
        if (!isset($this->caches[$name]) && ($userid = $this->get_user_id())) {
            $this->caches[$name] = new rcube_cache($type, $userid, $name, $ttl, $packed);
        }

        return $this->caches[$name];
    }
public function get_cache($name, $type='db', $ttl=0, $packed=true)
    {
        if (!isset($this->caches[$name]) && ($userid = $this->get_user_id())) {
            $this->caches[$name] = new rcube_cache($type, $userid, $name, $ttl, $packed);
        }

        return $this->caches[$name];
    }
public function get_cache ( $ name , $ type = 'db' , $ ttl = 0 , $ packed = true ) { if ( ! isset ( $ this -> caches [ $ name ] ) && ( $ userid = $ this -> get_user_id ( ) ) ) { $ this -> caches [ $ name ] = new rcube_cache ( $ type , $ userid , $ name , $ ttl , $ packed ) ; } return $ this -> caches [ $ name ] ; }
Initialize and get cache object

@param string $name   Cache identifier
@param string $type   Cache type ('db', 'apc' or 'memcache')
@param string $ttl    Expiration time for cache items
@param bool   $packed Enables/disables data serialization

@return rcube_cache Cache object
Initialize and get cache object