Interface TemplateCache

All Known Implementing Classes:
ConcurrentMapTemplateCache, HighConcurrencyTemplateCache, NullTemplateCache

@Deprecated(since="2024-07-10") public interface TemplateCache
Deprecated.
com.github.jknack.handlebars.cache package is deprecated and marked for removal in subsequent releases which will involve removal of the handlebars dependency in AEM.
The template cache system.
Since:
0.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated.
    Remove all mappings from the cache.
    void
    Deprecated.
    Evict the mapping for this source from this cache if it is present.
    get(TemplateSource source, Parser parser)
    Deprecated.
    Return the value to which this cache maps the specified key.
    setReload(boolean reload)
    Deprecated.
    Turn on/off auto reloading of templates.
  • Method Details

    • clear

      void clear()
      Deprecated.
      Remove all mappings from the cache.
    • evict

      void evict(TemplateSource source)
      Deprecated.
      Evict the mapping for this source from this cache if it is present.
      Parameters:
      source - the source whose mapping is to be removed from the cache
    • get

      Template get(TemplateSource source, Parser parser) throws IOException
      Deprecated.
      Return the value to which this cache maps the specified key.
      Parameters:
      source - source whose associated template is to be returned.
      parser - The Handlebars parser.
      Returns:
      A template.
      Throws:
      IOException - If input can't be parsed.
    • setReload

      TemplateCache setReload(boolean reload)
      Deprecated.
      Turn on/off auto reloading of templates. Auto reload is done using TemplateSource.lastModified().
      Parameters:
      reload - True, for turning off template reload. Default is: false.
      Returns:
      This template loader.