|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.util.ConfluenceVelocityResourceCache
public class ConfluenceVelocityResourceCache
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.
| Field Summary | |
|---|---|
static org.apache.log4j.Category |
log
|
| Constructor Summary | |
|---|---|
ConfluenceVelocityResourceCache(com.atlassian.cache.CacheFactory cacheFactory)
Create a resource cache using the provided cache manager. |
|
| Method Summary | |
|---|---|
void |
clear()
|
static void |
clearAllCaches()
Deprecated. Use getInstance().clear() |
java.util.Iterator |
enumerateKeys()
|
org.apache.velocity.runtime.resource.Resource |
get(java.lang.Object key)
|
static ConfluenceVelocityResourceCache |
getInstance()
Get the Confluence resource cache singleton. |
void |
initialize(org.apache.velocity.runtime.RuntimeServices runtimeServices)
|
org.apache.velocity.runtime.resource.Resource |
put(java.lang.Object key,
org.apache.velocity.runtime.resource.Resource resource)
|
org.apache.velocity.runtime.resource.Resource |
remove(java.lang.Object key)
|
static void |
removeFromCaches(java.lang.Object key)
Remove a particular object from the cache |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.log4j.Category log
| Constructor Detail |
|---|
public ConfluenceVelocityResourceCache(com.atlassian.cache.CacheFactory cacheFactory)
| Method Detail |
|---|
public static ConfluenceVelocityResourceCache getInstance()
public static void clearAllCaches()
public static void removeFromCaches(java.lang.Object key)
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.public void initialize(org.apache.velocity.runtime.RuntimeServices runtimeServices)
initialize in interface org.apache.velocity.runtime.resource.ResourceCachepublic org.apache.velocity.runtime.resource.Resource get(java.lang.Object key)
get in interface org.apache.velocity.runtime.resource.ResourceCache
public org.apache.velocity.runtime.resource.Resource put(java.lang.Object key,
org.apache.velocity.runtime.resource.Resource resource)
put in interface org.apache.velocity.runtime.resource.ResourceCachepublic org.apache.velocity.runtime.resource.Resource remove(java.lang.Object key)
remove in interface org.apache.velocity.runtime.resource.ResourceCachepublic java.util.Iterator enumerateKeys()
enumerateKeys in interface org.apache.velocity.runtime.resource.ResourceCachepublic void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||