Pairity/src/Contracts/CacheableDaoInterface.php
Funky Waddle 68f3c05868
Some checks are pending
CI / test (8.2) (push) Waiting to run
CI / test (8.3) (push) Waiting to run
Cache and some other things
2026-01-06 10:56:40 -06:00

31 lines
648 B
PHP

<?php
namespace Pairity\Contracts;
use Psr\SimpleCache\CacheInterface;
interface CacheableDaoInterface extends DaoInterface
{
/**
* Set the cache instance for this DAO.
*/
public function setCache(CacheInterface $cache): static;
/**
* Get the cache instance.
*/
public function getCache(): ?CacheInterface;
/**
* Get cache configuration (enabled, ttl, prefix).
*
* @return array{enabled: bool, ttl: ?int, prefix: string}
*/
public function cacheConfig(): array;
/**
* Clear all cache entries related to this DAO/Table.
*/
public function clearCache(): bool;
}