. */ namespace SP\Infrastructure\File; /** * Interface FileStorageInterface * * @package SP\Infrastructure\File; */ interface FileCacheInterface { /** * @param string|null $path * * @return mixed * @throws \SP\Infrastructure\File\FileException */ public function load(?string $path = null): mixed; /** * @throws FileException */ public function save(mixed $data, ?string $path = null): 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; }