public final class RedisCache
extends java.lang.Object
implements org.apache.shenyu.plugin.cache.ICache
| Constructor and Description |
|---|
RedisCache(RedisConfigProperties redisConfigProperties) |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<java.lang.Boolean> |
cacheData(java.lang.String key,
byte[] bytes,
long timeoutSeconds)
Cache the data with the key.
|
void |
close()
close the redis cache.
|
reactor.core.publisher.Mono<byte[]> |
getData(java.lang.String key)
Get data with the key.
|
reactor.core.publisher.Mono<java.lang.Boolean> |
isExist(java.lang.String key)
Check the cache is existed or not.
|
public RedisCache(RedisConfigProperties redisConfigProperties)
public reactor.core.publisher.Mono<java.lang.Boolean> cacheData(java.lang.String key,
byte[] bytes,
long timeoutSeconds)
cacheData in interface org.apache.shenyu.plugin.cache.ICachekey - the cache keybytes - the datatimeoutSeconds - value valid timepublic reactor.core.publisher.Mono<java.lang.Boolean> isExist(java.lang.String key)
isExist in interface org.apache.shenyu.plugin.cache.ICachekey - the cache keypublic reactor.core.publisher.Mono<byte[]> getData(java.lang.String key)
getData in interface org.apache.shenyu.plugin.cache.ICachekey - the cache keypublic void close()
close in interface org.apache.shenyu.plugin.cache.ICacheCopyright © 2024 The Apache Software Foundation. All rights reserved.