Class RequestCache
java.lang.Object
com.atlassian.plugin.webresource.impl.RequestCache
A place to store the results of operations performed during a single request-response lifecycle.
The cache's primary goal is to "freeze" application state as it is interrogated, so that values
are evaluated once and thus stable for the duration of the request-response lifecycle.
Avoiding potentially expensive operations being run multiple times is a nice bonus.
This class expects to be constructed per request. It is not an appropriate way to marshal and unmarshal
application state across multiple requests from a client.
- Since:
- v3.3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionNeeded by WebResource as a storage for Cache.getCachedResources(ResourceKeysSupplier resourceKeysSupplier) Batches and Sub Batches are cached and as such can't contain references to Resources, this cache helps with that.Get all bundles.static List<ResourceKey>toResourceKeys(List<Resource> resources)
-
Constructor Details
-
RequestCache
-
-
Method Details
-
toResourceKeys
-
getGlobals
-
getCachedResources
Needed by WebResource as a storage for Cache. -
getCachedResources
Batches and Sub Batches are cached and as such can't contain references to Resources, this cache helps with that. -
getCachedConditionsEvaluation
-
getCachedConditionsParameters
-
getSnapshot
Get all bundles.It is another layer of cache over the `globals.getBundles()` because it is used very heavily, to avoid any performance drawbacks of atomic reference in the `globals.getBundles()`.
-