DiskCache: tweak how expiration is invoked

This commit is contained in:
Andrew Dolgov
2022-11-24 18:49:36 +03:00
parent 3180b35807
commit be6bc72a74
4 changed files with 21 additions and 16 deletions

View File

@@ -9,7 +9,6 @@ interface Cache_Adapter {
* @return int|false -1 if the file doesn't exist, false if an error occurred, size in bytes otherwise
*/
public function get_size(string $filename);
/**
* @return int|false -1 if the file doesn't exist, false if an error occurred, timestamp otherwise
*/
@@ -30,5 +29,7 @@ interface Cache_Adapter {
* @return bool|int false if the file doesn't exist (or unreadable) or isn't audio/video, true if a plugin handled, otherwise int of bytes sent
*/
public function send(string $filename);
/** Catchall function to expire all subfolders/prefixes in the cache, invoked on the backend */
public function expire_all(): void;
}