. */ namespace SP\Infrastructure\File; /** * Interface FileStorageInterface * * @package SP\Infrastructure\File; */ interface FileCacheInterface { /** * @return mixed * @throws FileException */ public function load(); /** * @throws FileException */ public function save($data): FileCacheInterface; public function delete(): FileCacheInterface; /** * Returns whether the file is expired */ public function isExpired(int $time = 86400): bool; /** * Returns if the file is expired comparing against a reference date * * @throws FileException */ public function isExpiredDate(int $date): bool; public function exists(): bool; }