Class ConfluenceVelocityResourceCache
java.lang.Object
com.atlassian.confluence.util.velocity.ConfluenceVelocityResourceCache
- All Implemented Interfaces:
org.apache.velocity.runtime.resource.ResourceCache
public class ConfluenceVelocityResourceCache
extends Object
implements org.apache.velocity.runtime.resource.ResourceCache
Clearable velocity cache.
We configure velocity to use this cache, then we can get at the static methods to globally remove things from the cache if we need to. This is necessary for the dynamic decorator stuff.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Iterator<?> org.apache.velocity.runtime.resource.ResourceGet the Confluence resource cache singleton.voidinitialize(@NonNull org.apache.velocity.runtime.RuntimeServices velocityServices) org.apache.velocity.runtime.resource.Resourceorg.apache.velocity.runtime.resource.Resourcestatic voidremoveFromCaches(@NonNull Object key) Remove a particular object from the cache
-
Method Details
-
getInstance
Get the Confluence resource cache singleton.- Returns:
- Resource cache singleton, may be null if Confluence caching has not been initialised.
-
removeFromCaches
Remove a particular object from the cache- Parameters:
key- the cache-key to remove. Any cached object with a key that has this key as a substring will be removed, for safety's sake.
-
initialize
public void initialize(@NonNull org.apache.velocity.runtime.RuntimeServices velocityServices) - Specified by:
initializein interfaceorg.apache.velocity.runtime.resource.ResourceCache
-
get
- Specified by:
getin interfaceorg.apache.velocity.runtime.resource.ResourceCache
-
put
public org.apache.velocity.runtime.resource.Resource put(@NonNull Object key, @Nullable org.apache.velocity.runtime.resource.Resource resource) - Specified by:
putin interfaceorg.apache.velocity.runtime.resource.ResourceCache
-
remove
- Specified by:
removein interfaceorg.apache.velocity.runtime.resource.ResourceCache
-
enumerateKeys
- Specified by:
enumerateKeysin interfaceorg.apache.velocity.runtime.resource.ResourceCache
-
clear
public void clear()
-