public interface ICache
| Modifier and Type | Method and Description |
|---|---|
default void |
cacheContentType(java.lang.String key,
org.springframework.http.MediaType mediaType,
long timeoutSeconds)
cache the content type.
|
reactor.core.publisher.Mono<java.lang.Boolean> |
cacheData(java.lang.String key,
byte[] bytes,
long timeoutSeconds)
Cache the data with the key.
|
default void |
close()
close the 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.
|
default byte[] |
mediaTypeToBytes(org.springframework.http.MediaType mediaType)
Media type to bytes.
|
default void |
setContentType(org.springframework.web.server.ServerWebExchange exchange,
byte[] contentTypeBytes)
set content type.
|
reactor.core.publisher.Mono<java.lang.Boolean> cacheData(java.lang.String key,
byte[] bytes,
long timeoutSeconds)
key - the cache keybytes - the datatimeoutSeconds - value valid timereactor.core.publisher.Mono<java.lang.Boolean> isExist(java.lang.String key)
key - the cache keyreactor.core.publisher.Mono<byte[]> getData(java.lang.String key)
key - the cache keydefault void cacheContentType(java.lang.String key,
org.springframework.http.MediaType mediaType,
long timeoutSeconds)
key - the keymediaType - the media typetimeoutSeconds - value valid timedefault byte[] mediaTypeToBytes(org.springframework.http.MediaType mediaType)
mediaType - the media typedefault void setContentType(org.springframework.web.server.ServerWebExchange exchange,
byte[] contentTypeBytes)
exchange - exchangecontentTypeBytes - contentTypedefault void close()
Copyright © 2024 The Apache Software Foundation. All rights reserved.