deprecate DiskCache->touch()

This commit is contained in:
Andrew Dolgov
2022-11-24 08:16:56 +03:00
parent 9732d8fc9f
commit 3180b35807
5 changed files with 7 additions and 12 deletions

View File

@@ -238,8 +238,12 @@ class DiskCache implements Cache_Adapter {
return $this->adapter->put($filename, $data);
}
/** @deprecated we can't assume cached files are local, and other storages
* might not support this operation (object metadata may be immutable) */
public function touch(string $filename): bool {
return $this->adapter->touch($filename);
user_error("DiskCache: called unsupported method touch() for $filename", E_USER_DEPRECATED);
return false;
}
public function get(string $filename): ?string {