mirror of
https://github.com/manualdousuario/marreta.git
synced 2026-05-03 14:00:21 +00:00
novo sistema de cache por disco ou s3
This commit is contained in:
parent
8124288ccc
commit
ca6b2413e2
4 changed files with 264 additions and 36 deletions
31
app/inc/Cache/CacheStorageInterface.php
Normal file
31
app/inc/Cache/CacheStorageInterface.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue