Initial Kohana install
[speedfreak] / Server / system / libraries / drivers / Cache.php
1 <?php defined('SYSPATH') OR die('No direct access allowed.');
2 /**
3  * Cache driver interface.
4  *
5  * $Id: Cache.php 4046 2009-03-05 19:23:29Z Shadowhand $
6  *
7  * @package    Cache
8  * @author     Kohana Team
9  * @copyright  (c) 2007-2008 Kohana Team
10  * @license    http://kohanaphp.com/license.html
11  */
12 interface Cache_Driver {
13
14         /**
15          * Set a cache item.
16          */
17         public function set($id, $data, array $tags = NULL, $lifetime);
18
19         /**
20          * Find all of the cache ids for a given tag.
21          */
22         public function find($tag);
23
24         /**
25          * Get a cache item.
26          * Return NULL if the cache item is not found.
27          */
28         public function get($id);
29
30         /**
31          * Delete cache items by id or tag.
32          */
33         public function delete($id, $tag = FALSE);
34
35         /**
36          * Deletes all expired cache items.
37          */
38         public function delete_expired();
39
40 } // End Cache Driver