Class PatternCacheInvalidator<K extends String,V>
- java.lang.Object
-
- org.craftercms.studio.impl.v2.utils.cache.PatternCacheInvalidator<K,V>
-
- Type Parameters:
K
- the type for the keysV
- the type for the values
- All Implemented Interfaces:
CacheInvalidator<K,V>
public class PatternCacheInvalidator<K extends String,V> extends Object implements CacheInvalidator<K,V>
Implementation ofCacheInvalidator
that invalidates all keys matching a pattern- Since:
- 4.0
- Author:
- joseross
-
-
Constructor Summary
Constructors Constructor Description PatternCacheInvalidator(String pattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
invalidate(com.google.common.cache.Cache<K,V> cache, K key)
Performs the cache invalidation based on the given key
-
-
-
Field Detail
-
pattern
protected String pattern
The pattern to match keys
-
-
Constructor Detail
-
PatternCacheInvalidator
@ConstructorProperties("pattern") public PatternCacheInvalidator(String pattern)
-
-
Method Detail
-
invalidate
public void invalidate(com.google.common.cache.Cache<K,V> cache, K key)
Description copied from interface:CacheInvalidator
Performs the cache invalidation based on the given key- Specified by:
invalidate
in interfaceCacheInvalidator<K extends String,V>
- Parameters:
cache
- the cache instancekey
- the key to invalidate
-
-