summaryrefslogtreecommitdiff
path: root/system/libraries/drivers/Cache.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/drivers/Cache.php')
-rw-r--r--system/libraries/drivers/Cache.php36
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