java.lang.Object
com.github.mizosoft.methanol.HttpCache.Builder
- Enclosing class:
HttpCache
A builder of
HttpCaches
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates a newHttpCache
.Asynchronously creates a newHttpCache
.cacheOn
(StorageExtension storageExtension) cacheOnDisk
(Path directory, long maxSize) Specifies that HTTP responses are to be persisted on disk, under the given directory, with the given size bound.cacheOnMemory
(long maxSize) Specifies that HTTP responses are to be cached on memory with the given size bound.Sets the executor to be used by the cache.listener
(HttpCache.Listener listener) Sets the cache'sListener
.statsRecorder
(HttpCache.StatsRecorder statsRecorder) Sets the cache'sStatsRecorder
.
-
Method Details
-
cacheOnMemory
Specifies that HTTP responses are to be cached on memory with the given size bound. -
cacheOnDisk
Specifies that HTTP responses are to be persisted on disk, under the given directory, with the given size bound. -
cacheOn
-
executor
Sets the executor to be used by the cache. -
statsRecorder
Sets the cache'sStatsRecorder
. -
listener
Sets the cache'sListener
. -
build
Creates a newHttpCache
. -
buildAsync
Asynchronously creates a newHttpCache
.
-