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