Added cache clear method

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15778 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2009-08-18 08:58:53 +00:00
parent ba7d22e65d
commit ec7a10b7f8
2 changed files with 30 additions and 0 deletions

View File

@@ -621,6 +621,21 @@ public class EntityLookupCache<K extends Serializable, V extends Object, VK exte
cache.remove(valueCacheKey);
}
/**
* Cache-only operation: Remove all cache entries
* <p/>
* <b>NOTE:</b> This operation removes ALL entries for ALL cache regions.
*/
public void clear()
{
// Handle missing cache
if (cache == null)
{
return;
}
cache.clear();
}
/**
* Key-wrapper used to separate cache regions, allowing a single cache to be used for different
* purposes.<b/>