Class RedisCacheStorage
- java.lang.Object
-
- org.swisspush.gateleen.cache.storage.RedisCacheStorage
-
- All Implemented Interfaces:
CacheStorage
public class RedisCacheStorage extends Object implements CacheStorage
-
-
Field Summary
Fields Modifier and Type Field Description static StringCACHE_PREFIXstatic StringCACHED_REQUESTSstatic StringSTORAGE_CLEANUP_TASK_LOCK
-
Constructor Summary
Constructors Constructor Description RedisCacheStorage(io.vertx.core.Vertx vertx, Lock lock, io.vertx.redis.client.RedisAPI redisAPI, long storageCleanupIntervalMs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.vertx.core.Future<Optional<io.vertx.core.buffer.Buffer>>cachedRequest(String cacheIdentifier)io.vertx.core.Future<Set<String>>cacheEntries()io.vertx.core.Future<Long>cacheEntriesCount()io.vertx.core.Future<Void>cacheRequest(String cacheIdentifier, io.vertx.core.buffer.Buffer cachedObject, Duration cacheExpiry)io.vertx.core.Future<Long>clearCache()
-
-
-
Field Detail
-
CACHED_REQUESTS
public static final String CACHED_REQUESTS
- See Also:
- Constant Field Values
-
CACHE_PREFIX
public static final String CACHE_PREFIX
- See Also:
- Constant Field Values
-
STORAGE_CLEANUP_TASK_LOCK
public static final String STORAGE_CLEANUP_TASK_LOCK
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RedisCacheStorage
public RedisCacheStorage(io.vertx.core.Vertx vertx, Lock lock, io.vertx.redis.client.RedisAPI redisAPI, long storageCleanupIntervalMs)
-
-
Method Detail
-
cacheRequest
public io.vertx.core.Future<Void> cacheRequest(String cacheIdentifier, io.vertx.core.buffer.Buffer cachedObject, Duration cacheExpiry)
- Specified by:
cacheRequestin interfaceCacheStorage
-
cachedRequest
public io.vertx.core.Future<Optional<io.vertx.core.buffer.Buffer>> cachedRequest(String cacheIdentifier)
- Specified by:
cachedRequestin interfaceCacheStorage
-
clearCache
public io.vertx.core.Future<Long> clearCache()
- Specified by:
clearCachein interfaceCacheStorage
-
cacheEntriesCount
public io.vertx.core.Future<Long> cacheEntriesCount()
- Specified by:
cacheEntriesCountin interfaceCacheStorage
-
cacheEntries
public io.vertx.core.Future<Set<String>> cacheEntries()
- Specified by:
cacheEntriesin interfaceCacheStorage
-
-