Package com.openhtmltopdf.extend.impl
Class FSDefaultCacheStore
java.lang.Object
com.openhtmltopdf.extend.impl.FSDefaultCacheStore
- All Implemented Interfaces:
FSCacheEx<String,FSCacheValue>
public class FSDefaultCacheStore extends Object implements 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.-
Constructor Summary
Constructors Constructor Description FSDefaultCacheStore() -
Method Summary
Modifier and Type Method Description FSCacheValueget(String key)FSCacheValueget(String key, Callable<? extends FSCacheValue> loader)voidput(String key, FSCacheValue value)
-
Constructor Details
-
FSDefaultCacheStore
public FSDefaultCacheStore()
-
-
Method Details
-
put
- Specified by:
putin interfaceFSCacheEx<String,FSCacheValue>
-
get
- Specified by:
getin interfaceFSCacheEx<String,FSCacheValue>
-
get
- Specified by:
getin interfaceFSCacheEx<String,FSCacheValue>
-