java.lang.Object | |
↳ | com.atlassian.confluence.cache.ThreadLocalCache |
A generic cache for "stuff" that is only needed for the lifetime of a web request or scheduled job. The most important rule for this cache is use custom types for keys. If you use some generic key type like a String, you will inevitably clobber someone else's cached data.
Don't use the ThreadLocalCache directly: use the ThreadLocalCacheAccessor to give you a typesafe container around the cache.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Clean up the cache for the current thread.
| |||||||||||
Flush the contents of the cache, but do not clean up the cache itself.
| |||||||||||
Retrieve an object from the cache
| |||||||||||
Initialise the cache for the current thread
| |||||||||||
Put an object in the cache
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object |
Clean up the cache for the current thread.
Flush the contents of the cache, but do not clean up the cache itself.
Retrieve an object from the cache
key | the cache key |
---|
Initialise the cache for the current thread
Put an object in the cache
key | the cache key |
---|---|
value | the value to cache |