https://www.phpfastcache.com * @author Georges.L (Geolim4) * */ declare(strict_types=1); namespace Phpfastcache\Core\Pool; use Psr\Cache\CacheItemInterface; /** * Trait AbstractCacheItemPoolTrait * @package Phpfastcache\Core\Pool */ trait AbstractDriverPoolTrait { /** * @return bool */ abstract protected function driverCheck(): bool; /** * @return bool */ abstract protected function driverConnect(): bool; /** * @param CacheItemInterface $item * @return null|array [ * 'd' => 'THE ITEM DATA' * 't' => 'THE ITEM DATE EXPIRATION' * 'g' => 'THE ITEM TAGS' * ] * */ abstract protected function driverRead(CacheItemInterface $item); /** * @param CacheItemInterface $item * @return bool */ abstract protected function driverWrite(CacheItemInterface $item): bool; /** * @param CacheItemInterface $item * @return bool */ abstract protected function driverDelete(CacheItemInterface $item): bool; /** * @return bool */ abstract protected function driverClear(): bool; }