# wp-optimize/3.3.0/vendor/mrclay/minify/lib/Minify/CacheInterface.php

WP-Optimize – Cache, Compress images, Minify &amp; Clean database to boost page speed &amp; performance, version 3.3.0. 59 lines.

- Page: https://pluginprobe.com/plugins/wp-optimize/3.3.0/code/vendor/mrclay/minify/lib/Minify/CacheInterface.php
- Raw: https://pluginprobe.com/plugins/wp-optimize/3.3.0/raw/vendor/mrclay/minify/lib/Minify/CacheInterface.php
- Modified: 2021-06-07T22:42:16+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-optimize/3.3.0/code/vendor/mrclay/minify/lib/Minify/CacheInterface.php#L10-L20`.

```php
<?php
/**
 * Interface Minify_CacheInterface
 * @package Minify
 */

/**
 * Interface for Minify cache adapters
 *
 * @package Minify
 */
interface Minify_CacheInterface
{
    /**
     * Write data to cache.
     *
     * @param string $id cache id (e.g. a filename)
     * @param string $data
     *
     * @return bool success
     */
    public function store($id, $data);

    /**
     * Get the size of a cache entry
     *
     * @param string $id cache id (e.g. a filename)
     *
     * @return int size in bytes
     */
    public function getSize($id);

    /**
     * Does a valid cache entry exist?
     *
     * @param string $id       cache id (e.g. a filename)
     * @param int    $srcMtime mtime of the original source file(s)
     *
     * @return bool exists
     */
    public function isValid($id, $srcMtime);

    /**
     * Send the cached content to output
     *
     * @param string $id cache id (e.g. a filename)
     */
    public function display($id);

    /**
     * Fetch the cached content
     *
     * @param string $id cache id (e.g. a filename)
     *
     * @return string
     */
    public function fetch($id);
}

```
