mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #7455 from dhensby/pulls/fix-circular-ref-issue
FIX Dont use var_export for cache key generation
This commit is contained in:
commit
7f5ca56e36
@ -3224,7 +3224,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
|||||||
$SNG = singleton($callerClass);
|
$SNG = singleton($callerClass);
|
||||||
|
|
||||||
$cacheComponents = array($filter, $orderby, $SNG->extend('cacheKeyComponent'));
|
$cacheComponents = array($filter, $orderby, $SNG->extend('cacheKeyComponent'));
|
||||||
$cacheKey = md5(var_export($cacheComponents, true));
|
$cacheKey = md5(serialize($cacheComponents));
|
||||||
|
|
||||||
// Flush destroyed items out of the cache
|
// Flush destroyed items out of the cache
|
||||||
if($cache && isset(DataObject::$_cache_get_one[$callerClass][$cacheKey])
|
if($cache && isset(DataObject::$_cache_get_one[$callerClass][$cacheKey])
|
||||||
|
Loading…
Reference in New Issue
Block a user