diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-11-24 19:20:36 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-11-24 19:20:36 -0800 |
commit | 9b6663f87a7e679ffba691cf516191fc840cf978 (patch) | |
tree | 20cf9f3aaf93b4ba69d282dcf10d259db4a752de /system/libraries/drivers/Cache.php | |
parent | 82ee5f9d338017c69331b2907f37a468ced8c66e (diff) |
Update to Kohana r4684 which is now Kohana 2.4 and has substantial
changes.
Diffstat (limited to 'system/libraries/drivers/Cache.php')
-rw-r--r-- | system/libraries/drivers/Cache.php | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/system/libraries/drivers/Cache.php b/system/libraries/drivers/Cache.php index 7c5e3c31..97415096 100644 --- a/system/libraries/drivers/Cache.php +++ b/system/libraries/drivers/Cache.php @@ -1,40 +1,42 @@ <?php defined('SYSPATH') OR die('No direct access allowed.'); /** - * Cache driver interface. + * Cache driver abstract class. * - * $Id: Cache.php 4046 2009-03-05 19:23:29Z Shadowhand $ + * $Id$ * * @package Cache * @author Kohana Team - * @copyright (c) 2007-2008 Kohana Team - * @license http://kohanaphp.com/license.html + * @copyright (c) 2007-2009 Kohana Team + * @license http://kohanaphp.com/license */ -interface Cache_Driver { - +abstract class Cache_Driver { /** - * Set a cache item. + * Set cache items */ - public function set($id, $data, array $tags = NULL, $lifetime); + abstract public function set($items, $tags = NULL, $lifetime = NULL); /** - * Find all of the cache ids for a given tag. + * Get a cache items by key */ - public function find($tag); + abstract public function get($keys, $single = FALSE); /** - * Get a cache item. - * Return NULL if the cache item is not found. + * Get cache items by tag */ - public function get($id); + abstract public function get_tag($tags); /** - * Delete cache items by id or tag. + * Delete cache item by key */ - public function delete($id, $tag = FALSE); + abstract public function delete($keys); /** - * Deletes all expired cache items. + * Delete cache items by tag */ - public function delete_expired(); + abstract public function delete_tag($tags); + /** + * Empty the cache + */ + abstract public function delete_all(); } // End Cache Driver
\ No newline at end of file |