mirror of
https://gh.wpcy.net/https://github.com/superdav42/wp-update-server-plugin.git
synced 2026-07-15 05:56:22 +08:00
31 lines
545 B
PHP
31 lines
545 B
PHP
<?php
|
|
/**
|
|
* A very basic cache interface.
|
|
*/
|
|
interface Wpup_Cache {
|
|
/**
|
|
* Get cached value.
|
|
*
|
|
* @param string $key
|
|
* @return mixed|null
|
|
*/
|
|
function get($key);
|
|
|
|
/**
|
|
* Update the cache.
|
|
*
|
|
* @param string $key Cache key.
|
|
* @param mixed $value The value to store in the cache.
|
|
* @param int $expiration Time until expiration, in seconds. Optional.
|
|
* @return void
|
|
*/
|
|
function set($key, $value, $expiration = 0);
|
|
|
|
/**
|
|
* Clear a cache
|
|
*
|
|
* @param string $key Cache key.
|
|
* @return void
|
|
*/
|
|
function clear($key);
|
|
}
|