1: <?php
2:
3: /**
4: * This file is part of the Nette Framework.
5: *
6: * Copyright (c) 2004, 2010 David Grudl (http://davidgrudl.com)
7: *
8: * This source file is subject to the "Nette license", and/or
9: * GPL license. For more information please see http://nette.org
10: * @package Nette\Caching
11: */
12:
13:
14:
15: /**
16: * NCache storage.
17: *
18: * @author David Grudl
19: */
20: interface ICacheStorage
21: {
22:
23: /**
24: * Read from cache.
25: * @param string key
26: * @return mixed|NULL
27: */
28: function read($key);
29:
30: /**
31: * Writes item into the cache.
32: * @param string key
33: * @param mixed data
34: * @param array dependencies
35: * @return void
36: */
37: function write($key, $data, array $dependencies);
38:
39: /**
40: * Removes item from the cache.
41: * @param string key
42: * @return void
43: */
44: function remove($key);
45:
46: /**
47: * Removes items from the cache by conditions.
48: * @param array conditions
49: * @return void
50: */
51: function clean(array $conds);
52:
53: }
54: