mirror of
https://github.com/manualdousuario/marreta.git
synced 2025-09-02 10:42:06 +00:00
31 lines
653 B
PHP
31 lines
653 B
PHP
<?php
|
|
|
|
namespace Inc\Cache;
|
|
|
|
interface CacheStorageInterface
|
|
{
|
|
/**
|
|
* Verifica se existe cache para um determinado ID
|
|
*
|
|
* @param string $id ID do cache
|
|
* @return bool
|
|
*/
|
|
public function exists(string $id): bool;
|
|
|
|
/**
|
|
* Recupera o conteúdo em cache
|
|
*
|
|
* @param string $id ID do cache
|
|
* @return string|null
|
|
*/
|
|
public function get(string $id): ?string;
|
|
|
|
/**
|
|
* Armazena conteúdo em cache
|
|
*
|
|
* @param string $id ID do cache
|
|
* @param string $content Conteúdo a ser armazenado
|
|
* @return bool
|
|
*/
|
|
public function set(string $id, string $content): bool;
|
|
}
|