public class TemplateNodesCacheKeyPartGenerator extends Object implements CacheKeyPartGenerator, RenderContextTuner
| Constructor and Description |
|---|
TemplateNodesCacheKeyPartGenerator() |
| Modifier and Type | Method and Description |
|---|---|
String |
getKey() |
String |
getValue(Resource resource,
RenderContext renderContext,
Properties properties)
Get value of this given key part.
|
Object |
prepareContextForContentGeneration(String value,
Resource resource,
RenderContext renderContext)
This will be called before a new RenderChain is started to generate a sub-fragment.
|
String |
replacePlaceholders(RenderContext renderContext,
String keyPart)
Replace placeholders in the keyPart to construct the final key used to store the fragment in the cache.
|
void |
restoreContextAfterContentGeneration(String value,
Resource resource,
RenderContext renderContext,
Object original)
This will be called after a RenderChain finished to generate a sub-fragment.
|
public String getKey()
getKey in interface CacheKeyPartGeneratorpublic String getValue(Resource resource, RenderContext renderContext, Properties properties)
CacheKeyPartGeneratorgetValue in interface CacheKeyPartGeneratorresource - the current rendered resourcerenderContext - the current renderContextproperties - the current fragment propertiespublic String replacePlaceholders(RenderContext renderContext, String keyPart)
CacheKeyPartGeneratorreplacePlaceholders in interface CacheKeyPartGeneratorrenderContext - the current render contextkeyPart - the key part, a value returned by the getValue(...) functionpublic Object prepareContextForContentGeneration(String value, Resource resource, RenderContext renderContext)
RenderContextTunerprepareContextForContentGeneration in interface RenderContextTunervalue - the value parsed from the key by this key part generatorresource - the current resource renderedrenderContext - the current renderContextpublic void restoreContextAfterContentGeneration(String value, Resource resource, RenderContext renderContext, Object original)
RenderContextTunerrestoreContextAfterContentGeneration in interface RenderContextTunervalue - the value parsed from the key by this key part generatorresource - the current resource renderedrenderContext - the current renderContextoriginal - the original object previously retrieved via prepareContextForContentGeneration() invocationCopyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.