From 3180b358076011d6a65b93bfa9323465447c755d Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 24 Nov 2022 08:16:56 +0300 Subject: deprecate DiskCache->touch() --- classes/diskcache.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'classes/diskcache.php') diff --git a/classes/diskcache.php b/classes/diskcache.php index 69b48688c..80c73682f 100644 --- a/classes/diskcache.php +++ b/classes/diskcache.php @@ -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 { -- cgit v1.2.3-54-g00ecf