From f2bf7366a31de8a88f64bce7bc03732ac379e5e8 Mon Sep 17 00:00:00 2001 From: ashraf Date: Tue, 3 Dec 2024 14:32:23 +0100 Subject: [PATCH] OXDEV-8412 Deprecate utils file cache methods --- CHANGELOG-7.3.md | 2 ++ source/Core/Utils.php | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/CHANGELOG-7.3.md b/CHANGELOG-7.3.md index 0721b30a5f..89cbd598a7 100644 --- a/CHANGELOG-7.3.md +++ b/CHANGELOG-7.3.md @@ -28,3 +28,5 @@ - Method `isEnabledAdminQueryLog()` of ContextInterface - `handleDatabaseException` functionality - `FileCache` and `SubShopSpecificFileCache` classes +- Related Methods for managing cache files in Utils will be deleted in next major version +- Parameter `includePermanentCache` of the method `Utils:oxResetFileCache()` diff --git a/source/Core/Utils.php b/source/Core/Utils.php index 6c2846a2d0..8a102d7493 100644 --- a/source/Core/Utils.php +++ b/source/Core/Utils.php @@ -385,6 +385,8 @@ public function cleanStaticCache($sCacheName = null) } /** + * @deprecated will be removed in next major version + * * Generates php file, which could later be loaded as include instead of parsed data. * Currently this method supports simple arrays only. * @@ -404,6 +406,8 @@ public function toPhpFileCache($sKey, $mContents) } /** + * @deprecated will be removed in next major version + * * Includes cached php file and loads stored contents. * * @param string $sKey Cache key. @@ -419,6 +423,8 @@ public function fromPhpFileCache($sKey) } /** + * @deprecated will be removed in next major version + * * If available returns cache meta data array * * @param string $sKey meta data/cache key @@ -431,6 +437,8 @@ public function getCacheMeta($sKey) } /** + * @deprecated will be removed in next major version + * * Saves cache meta data (information) * * @param string $sKey meta data/cache key @@ -508,6 +516,8 @@ public function fromFileCache($sKey) } /** + * @deprecated will be removed in next major version + * * Reads and returns cache file contents * * @param string $sFilePath cache fiel path @@ -522,6 +532,8 @@ protected function readFile($sFilePath) } /** + * @deprecated will be removed in next major version + * * Includes cache file * * @param string $sFilePath cache file path @@ -537,6 +549,8 @@ protected function includeFile($sFilePath) } /** + * @deprecated will be removed in next major version + * * Serializes or writes php array for class file cache * * @param string $sKey cache key @@ -560,6 +574,8 @@ protected function processCache($sKey, $mContents) } /** + * @deprecated will be removed in next major version + * * Writes all cache contents to file at once. This method was introduced due to possible * race conditions. Cache is cleaned up after commit */ @@ -588,6 +604,8 @@ public function commitFileCache() } /** + * @deprecated will be removed in next major version + * * Locks cache file and returns its handle on success or false on failure * * @param string $sFilePath name of file to lock @@ -641,6 +659,8 @@ protected function lockFile($sFilePath, $sIdent, $iLockMode = LOCK_EX) } /** + * @deprecated will be removed in next major version + * * Releases file lock and returns release state * * @param string $sIdent lock ident @@ -1192,6 +1212,8 @@ public function oxMimeContentType($sFileName) } /** + * @deprecated will be removed in next major version + * * Returns full path (including file name) to cache file * * @todo: test @@ -1216,6 +1238,8 @@ public function getCacheFilePath($sCacheName, $blPathOnly = false, $sExtension = } /** + * @deprecated will be removed in next major version + * * Get current edition prefix * @return string */