Closed davidkrmela closed 6 years ago
$lifeTime=NULL probably should has same behaviour as $lifeTime=0 in Cache::doSave. This change match condition with official Filesystem cache: https://github.com/doctrine/cache/blob/v1.7.1/lib/Doctrine/Common/Cache/FilesystemCache.php#L102
$lifeTime=NULL
$lifeTime=0
Otherwise caching of ClassMetadata is broken and data is never cached. ClassMetadataFactory use $lifeTime=NULL with meaning expire=never: https://github.com/doctrine/common/blob/v2.8.1/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php#L221
expire=never
$lifeTime is not supposed to be null, it should always be integer. Send a PR to Doctrine.
$lifeTime
I sent the PR to Doctrine but I'll merge this anyway as a hotfix and for compatibility with older versions of Doctrine.
$lifeTime=NULL
probably should has same behaviour as$lifeTime=0
in Cache::doSave. This change match condition with official Filesystem cache: https://github.com/doctrine/cache/blob/v1.7.1/lib/Doctrine/Common/Cache/FilesystemCache.php#L102Otherwise caching of ClassMetadata is broken and data is never cached. ClassMetadataFactory use
$lifeTime=NULL
with meaningexpire=never
: https://github.com/doctrine/common/blob/v2.8.1/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php#L221