Interface BatchStrategy
public interface BatchStrategy
A
BatchStrategy
to be used with RedisCacheWriter
.
Mainly used to clear the cache.
Predefined strategies using the KEYS
or SCAN
commands can be found in BatchStrategies
.
- Since:
- 2.6
- Author:
- Mark Paluch, Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptionlong
cleanCache
(RedisConnection connection, String name, byte[] pattern) Remove all keys following the given pattern.
-
Method Details
-
cleanCache
Remove all keys following the given pattern.- Parameters:
connection
- the connection to use. Must not be null.name
- The cache name. Must not be null.pattern
- The pattern for the keys to remove. Must not be null.- Returns:
- number of removed keys.
-