gyro/core/lib/interfaces/icachepersister.cls.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * Interface for classes that persist cache items 00004 * 00005 * @author Gerd Riesselmann 00006 * @ingroup Interfaces 00007 */ 00008 interface ICachePersister { 00009 /** 00010 * Returns true, if item is cached 00011 * 00012 * @param $cache_keys mixed A set of key params, may be an array or a string 00013 * @return bool 00014 */ 00015 public function is_cached($cache_keys); 00016 00017 /** 00018 * Read from cache 00019 * 00020 * @param Mixed A set of key params, may be an array or a string 00021 * @return ICacheItem False if cache is not found 00022 */ 00023 public function read($cache_keys); 00024 00025 /** 00026 * Store content in cache 00027 * 00028 * @param mixed $cache_keys A set of key params, may be an array or a string 00029 * @param string $content The cache 00030 * @param int $cache_life_time Cache life time in seconds 00031 * @param mixed $data Any data assoziated with this item 00032 * @param bool $is_compressed True, if $content is already gzip compressed 00033 */ 00034 public function store($cache_keys, $content, $cache_life_time, $data = '', $is_compressed = false); 00035 00036 /** 00037 * Clear the cache 00038 * 00039 * @param mixed $cache_keys A set of key params, may be an array or a string, or an ICachable instance. If NULL, all is cleared 00040 */ 00041 public function clear($cache_keys = NULL); 00042 00043 /** 00044 * Removes expired cache entries 00045 */ 00046 public function remove_expired(); 00047 }