io.vertx.ext.web.templ

## Class CachingTemplateEngine<T>

- java.lang.Object
- - io.vertx.ext.web.templ.CachingTemplateEngine<T>

- All Implemented Interfaces:
    TemplateEngine

      public abstract class CachingTemplateEngine<T>
      extends Object
      implements TemplateEngine

  Author:
    Tim Fox

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected io.vertx.ext.web.impl.ConcurrentLRUCache<String,T>` | `cache`
    `static String` | `DISABLE_TEMPL_CACHING_PROP_NAME`
    `protected String` | `extension`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `CachingTemplateEngine(String ext, int maxCacheSize)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected String` | `adjustLocation(String location)`
    `protected void` | `doSetExtension(String ext)`
    `boolean` | `isCachingEnabled()` Returns true if the template engine caches template files.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface io.vertx.ext.web.templ.TemplateEngine

      `render, render`

    - ### Methods inherited from interface io.vertx.ext.web.common.template.TemplateEngine

      `render, render`

- - ### Field Detail

    - #### DISABLE_TEMPL_CACHING_PROP_NAME

          public static final String DISABLE_TEMPL_CACHING_PROP_NAME

      See Also:
        Constant Field Values

    - #### cache

          protected final io.vertx.ext.web.impl.ConcurrentLRUCache<String,T> cache

    - #### extension

          protected String extension

  - ### Constructor Detail

    - #### CachingTemplateEngine

          protected CachingTemplateEngine(String ext,
                                          int maxCacheSize)

  - ### Method Detail

    - #### isCachingEnabled

          public boolean isCachingEnabled()

      Description copied from interface: `TemplateEngine`
      Returns true if the template engine caches template files. If false, then template files are freshly loaded each time they are used.
      Specified by:
        `isCachingEnabled` in interface `TemplateEngine`
      Returns:
        True if template files are cached; otherwise, false.

    - #### adjustLocation

          protected String adjustLocation(String location)

    - #### doSetExtension

          protected void doSetExtension(String ext)

Copyright © 2019 Eclipse. All rights reserved.