/** * Removes all entries from the template cache, thus forcing reloading of templates * on subsequent <code>getTemplate</code> calls. * * <p>This method is thread-safe and can be called while the engine processes templates. */ public void clearTemplateCache() { cache.clear(); }
/** * Setis if localized template lookup is enabled or not. */ public void setLocalizedLookup(boolean localizedLookup) { // synchronized was moved here so that we don't advertise that it's thread-safe, as it's not. synchronized (this) { if (this.localizedLookup != localizedLookup) { this.localizedLookup = localizedLookup; clear(); } } }
/** * Sets the configuration object to which this cache belongs. This * method is called by the configuration itself to establish the * relation, and should not be called by users. * * @deprecated Use the {@link #TemplateCache(TemplateLoader, CacheStorage, Configuration)} constructor. */ @Deprecated public void setConfiguration(Configuration config) { this.config = config; clear(); }
private void recreateTemplateCacheWith( TemplateLoader loader, CacheStorage storage, TemplateLookupStrategy templateLookupStrategy, TemplateNameFormat templateNameFormat, TemplateConfigurationFactory templateConfigurations) { TemplateCache oldCache = cache; cache = new TemplateCache( loader, storage, templateLookupStrategy, templateNameFormat, templateConfigurations, this); cache.clear(); // for fully BC behavior cache.setDelay(oldCache.getDelay()); cache.setLocalizedLookup(localizedLookup); }
private void createTemplateCache() { cache = new TemplateCache( getDefaultTemplateLoader(), getDefaultCacheStorage(), getDefaultTemplateLookupStrategy(), getDefaultTemplateNameFormat(), null, this); cache.clear(); // for fully BC behavior cache.setDelay(5000); }
/** * Removes all entries from the template cache, thus forcing reloading of templates * on subsequent <code>getTemplate</code> calls. * * <p>This method is thread-safe and can be called while the engine processes templates. */ public void clearTemplateCache() { cache.clear(); }
/** * Removes all entries from the template cache, thus forcing reloading of templates * on subsequent <code>getTemplate</code> calls. * This method is thread-safe and can be called while the engine works. */ public void clearTemplateCache() { cache.clear(); }
/** * Sets the configuration object to which this cache belongs. This * method is called by the configuration itself to establish the * relation, and should not be called by users. */ public void setConfiguration(Configuration config) { this.config = config; clear(); }
/** * Setis if localized template lookup is enabled or not. */ public void setLocalizedLookup(boolean localizedLookup) { // synchronized was moved here so that we don't advertise that it's thread-safe, as it's not. synchronized (this) { if (this.localizedLookup != localizedLookup) { this.localizedLookup = localizedLookup; clear(); } } }
/** * Setis if localized template lookup is enabled or not. */ public void setLocalizedLookup(boolean localizedLookup) { // synchronized was moved here so that we don't advertise that it's thread-safe, as it's not. synchronized (this) { if (this.localizedLookup != localizedLookup) { this.localizedLookup = localizedLookup; clear(); } } }
/** * Removes all entries from the template cache, thus forcing reloading of templates * on subsequent <code>getTemplate</code> calls. * * <p>This method is thread-safe and can be called while the engine processes templates. */ public void clearTemplateCache() { cache.clear(); }
/** * Sets the configuration object to which this cache belongs. This * method is called by the configuration itself to establish the * relation, and should not be called by users. * * @deprecated Use the {@link #TemplateCache(TemplateLoader, CacheStorage, Configuration)} constructor. */ @Deprecated public void setConfiguration(Configuration config) { this.config = config; clear(); }
/** * Sets the configuration object to which this cache belongs. This * method is called by the configuration itself to establish the * relation, and should not be called by users. * * @deprecated Use the {@link #TemplateCache(TemplateLoader, CacheStorage, Configuration)} constructor. */ @Deprecated public void setConfiguration(Configuration config) { this.config = config; clear(); }
private void recreateTemplateCacheWith( TemplateLoader loader, CacheStorage storage, TemplateLookupStrategy templateLookupStrategy, TemplateNameFormat templateNameFormat, TemplateConfigurationFactory templateConfigurations) { TemplateCache oldCache = cache; cache = new TemplateCache( loader, storage, templateLookupStrategy, templateNameFormat, templateConfigurations, this); cache.clear(); // for fully BC behavior cache.setDelay(oldCache.getDelay()); cache.setLocalizedLookup(localizedLookup); }
private void recreateTemplateCacheWith( TemplateLoader loader, CacheStorage storage, TemplateLookupStrategy templateLookupStrategy, TemplateNameFormat templateNameFormat, TemplateConfigurationFactory templateConfigurations) { TemplateCache oldCache = cache; cache = new TemplateCache( loader, storage, templateLookupStrategy, templateNameFormat, templateConfigurations, this); cache.clear(); // for fully BC behavior cache.setDelay(oldCache.getDelay()); cache.setLocalizedLookup(localizedLookup); }
private void createTemplateCache() { cache = new TemplateCache( getDefaultTemplateLoader(), getDefaultCacheStorage(), getDefaultTemplateLookupStrategy(), getDefaultTemplateNameFormat(), null, this); cache.clear(); // for fully BC behavior cache.setDelay(5000); }
private void createTemplateCache() { cache = new TemplateCache( getDefaultTemplateLoader(), getDefaultCacheStorage(), getDefaultTemplateLookupStrategy(), getDefaultTemplateNameFormat(), null, this); cache.clear(); // for fully BC behavior cache.setDelay(5000); }