summaryrefslogtreecommitdiff
path: root/system/libraries/drivers/Cache.php
diff options
context:
space:
mode:
authorNathan Kinkade <nkinkade@nkinka.de>2010-01-03 15:51:24 +0000
committerNathan Kinkade <nkinkade@nkinka.de>2010-01-03 15:51:24 +0000
commit399abbc3a754cf5fdcfdff113446e1bc264091e2 (patch)
tree592188568e15325d59e51bf19cfdf667fae8d86d /system/libraries/drivers/Cache.php
parent925a6a2220760cb7daacee1ab80a07b61b3a30a1 (diff)
parent64e5efd57ba1479179c202e1b76b6eeb42d2924c (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
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