rosavox/lib/alveolata/cache/abstract/interface.php
2025-05-23 07:33:29 +00:00

64 lines
860 B
PHP

<?php
namespace alveolata\cache;
// require_once(DIR_ALVEOLATA . '/definitions.php');
/**
* @author Christian Fraß <frass@greenscale.de>
*/
interface interface_cache
{
/**
* shell store a value
*
* @param string $id
* @param mixed $value
* @author Christian Fraß <frass@greenscale.de>
*/
function set(
string $id,
$value
) : void
;
/**
* shall tell if a value is set
*
* @param string $id
* @return bool
* @author Christian Fraß <frass@greenscale.de>
*/
function has(
string $id
) : bool
;
/**
* shall fetch a stored value
*
* @param string $id
* @return mixed
* @author Christian Fraß <frass@greenscale.de>
*/
function fetch(
string $id
)
;
/**
* shall remove all stored values
*
* @author Christian Fraß <frass@greenscale.de>
*/
function clear(
) : void
;
}