PluginProbe
WP Super Minify • Minify, Compress and Cache HTML, CSS & JavaScript / trunk
WP Super Minify • Minify, Compress and Cache HTML, CSS & JavaScript vtrunk
trunk 1.0 1.1 1.2 1.3 1.3.1 1.3.2 1.4 1.5 1.5.1 1.6 2.0 2.0.1
wp-super-minify / includes / min / lib / Minify / CacheInterface.php

CacheInterface.php in WP Super Minify • Minify, Compress and Cache HTML, CSS & JavaScript trunk, at includes/min/lib/Minify/CacheInterface.php

59 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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