| 1 |
<?php |
| 2 |
/** |
| 3 |
* Interface Minify_CacheInterface |
| 4 |
* @package Minify |
| 5 |
*/ |
| 6 |
|
| 7 |
/** |
| 8 |
* Interface for Minify cache adapters |
| 9 |
* |
| 10 |
* @package Minify |
| 11 |
*/ |
| 12 |
interface Minify_CacheInterface |
| 13 |
{ |
| 14 |
/** |
| 15 |
* Write data to cache. |
| 16 |
* |
| 17 |
* @param string $id cache id (e.g. a filename) |
| 18 |
* @param string $data |
| 19 |
* |
| 20 |
* @return bool success |
| 21 |
*/ |
| 22 |
public function store($id, $data); |
| 23 |
|
| 24 |
/** |
| 25 |
* Get the size of a cache entry |
| 26 |
* |
| 27 |
* @param string $id cache id (e.g. a filename) |
| 28 |
* |
| 29 |
* @return int size in bytes |
| 30 |
*/ |
| 31 |
public function getSize($id); |
| 32 |
|
| 33 |
/** |
| 34 |
* Does a valid cache entry exist? |
| 35 |
* |
| 36 |
* @param string $id cache id (e.g. a filename) |
| 37 |
* @param int $srcMtime mtime of the original source file(s) |
| 38 |
* |
| 39 |
* @return bool exists |
| 40 |
*/ |
| 41 |
public function isValid($id, $srcMtime); |
| 42 |
|
| 43 |
/** |
| 44 |
* Send the cached content to output |
| 45 |
* |
| 46 |
* @param string $id cache id (e.g. a filename) |
| 47 |
*/ |
| 48 |
public function display($id); |
| 49 |
|
| 50 |
/** |
| 51 |
* Fetch the cached content |
| 52 |
* |
| 53 |
* @param string $id cache id (e.g. a filename) |
| 54 |
* |
| 55 |
* @return string |
| 56 |
*/ |
| 57 |
public function fetch($id); |
| 58 |
} |
| 59 |
|