Fixed ALF-10665: Immutable caches do not respond well to null (=> @@VALUE_NOT_FOUND@@)

- Immutable caches assume that values are correct and write through
 - Null value markers will get overridden


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31144 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2011-10-11 15:37:56 +00:00
parent 5aaf1ad850
commit f3c5571ef2
2 changed files with 30 additions and 6 deletions

View File

@@ -838,12 +838,9 @@ public class TransactionalCache<K extends Serializable, V extends Object>
Object sharedObj = sharedCache.get(key);
if (!mutable)
{
// Value can't change
if (sharedObj == null)
{
// Still nothing in the cache
sharedCache.put(key, value);
}
// The value can't change so we can write through on the assumption
// that the value is always correct
sharedCache.put(key, value);
}
else if (readOnly)
{