diff --git a/system/cache/policies/AbstractEvictionPolicy.cfc b/system/cache/policies/AbstractEvictionPolicy.cfc index e9569f60f..0da5c7ae9 100644 --- a/system/cache/policies/AbstractEvictionPolicy.cfc +++ b/system/cache/policies/AbstractEvictionPolicy.cfc @@ -83,6 +83,9 @@ component continue; } var md = indexer.getObjectMetadata( item ); + if ( NOT md.keyExists( "timeout" ) || NOT md.keyExists( "isExpired" ) ) { + continue; + } // Evict if not already marked for eviction or an eternal object. if ( md.timeout GT 0 AND NOT md.isExpired ) { diff --git a/system/cache/store/ConcurrentSoftReferenceStore.cfc b/system/cache/store/ConcurrentSoftReferenceStore.cfc index 70e973368..908b210c7 100644 --- a/system/cache/store/ConcurrentSoftReferenceStore.cfc +++ b/system/cache/store/ConcurrentSoftReferenceStore.cfc @@ -189,7 +189,8 @@ component extends="coldbox.system.cache.store.ConcurrentStore" accessors=true { if ( !isNull( local.softRef ) && variables.indexer.getObjectMetadataProperty( arguments.objectKey, - "isSoftReference" + "isSoftReference", + false ) ) { variables.softRefKeyMap.remove( softRef.hashCode() );