traduções de documentações

This commit is contained in:
Renan Bernordi 2025-01-06 19:44:02 -03:00
parent 55ac7fe018
commit a97966c1b4
16 changed files with 514 additions and 181 deletions

View file

@ -2,17 +2,26 @@
namespace Inc\Cache;
/**
* Disk-based cache storage implementation
* Implementação de armazenamento de cache em disco
*
* This class implements file-based caching using gzip compression
* Esta classe implementa cache baseado em arquivos usando compressão gzip
*/
class DiskStorage implements CacheStorageInterface
{
/**
* @var string Directory where cache files will be stored
* @var string Diretório onde os arquivos de cache serão armazenados
*/
private $cacheDir;
/**
* Class constructor
* Construtor da classe
*
* @param string $cacheDir Diretório base para armazenamento do cache
* @param string $cacheDir Base directory for cache storage / Diretório base para armazenamento do cache
*/
public function __construct(string $cacheDir)
{
@ -23,7 +32,11 @@ class DiskStorage implements CacheStorageInterface
}
/**
* {@inheritdoc}
* Checks if cache exists for a given ID
* Verifica se existe cache para um determinado ID
*
* @param string $id Cache ID / ID do cache
* @return bool True if cache exists, false otherwise / True se o cache existir, false caso contrário
*/
public function exists(string $id): bool
{
@ -32,7 +45,11 @@ class DiskStorage implements CacheStorageInterface
}
/**
* {@inheritdoc}
* Retrieves cached content
* Recupera o conteúdo em cache
*
* @param string $id Cache ID / ID do cache
* @return string|null Cached content or null if not found / Conteúdo em cache ou null se não encontrado
*/
public function get(string $id): ?string
{
@ -51,7 +68,12 @@ class DiskStorage implements CacheStorageInterface
}
/**
* {@inheritdoc}
* Stores content in cache
* Armazena conteúdo em cache
*
* @param string $id Cache ID / ID do cache
* @param string $content Content to be stored / Conteúdo a ser armazenado
* @return bool True if successful, false otherwise / True se bem sucedido, false caso contrário
*/
public function set(string $id, string $content): bool
{