Skip to content

Commit

Permalink
OXDEV-8412 Deprecate utils file cache methods
Browse files Browse the repository at this point in the history
  • Loading branch information
AshrafOxid committed Dec 10, 2024
1 parent 52c50ba commit f2bf736
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG-7.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()`
24 changes: 24 additions & 0 deletions source/Core/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
*/
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
*/
Expand Down

0 comments on commit f2bf736

Please sign in to comment.