Package com.openhtmltopdf.extend.impl
Class FSDefaultCacheStore
java.lang.Object
com.openhtmltopdf.extend.impl.FSDefaultCacheStore
- All Implemented Interfaces:
FSCacheEx<String,
FSCacheValue>
A simple default cache implementation, mainly for testing. For production you will probably want to wrap Guava's cache implementation
or something similar. This implementation does not use synchronisation beyond using a
ConcurrentHashMap
internally.
Specifically, the get(String, Callable)
may call the loader multiple times if called in close succession.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget
(String key, Callable<? extends FSCacheValue> loader) void
put
(String key, FSCacheValue value)
-
Field Details
-
_store
-
-
Constructor Details
-
FSDefaultCacheStore
public FSDefaultCacheStore()
-
-
Method Details
-
put
- Specified by:
put
in interfaceFSCacheEx<String,
FSCacheValue>
-
get
- Specified by:
get
in interfaceFSCacheEx<String,
FSCacheValue>
-
get
- Specified by:
get
in interfaceFSCacheEx<String,
FSCacheValue>
-