Skip to content

Protocol

LeafCache

LeafCache provides blind storage for compiled LeafAST objects.
protocol LeafCache

Overview

The stored LeafASTs may or may not be fully renderable templates, and generally speaking no attempts should be made inside a LeafCache adherent to make any changes to the stored document.

All definied access methods to a LeafCache adherent must guarantee EventLoopFuture-based return values. For performance, an adherent may optionally provide additional, corresponding interfaces where returns are direct values and not future-based by adhering to SynchronousLeafCache and providing applicable option flags indicating which methods may be used. This should only used for adherents where the cache store itself is not a bottleneck.

LeafAST.name is to be used in all cases as the key for retrieving cached documents.

Topics

Instance Properties

  • count
    Current count of cached documents
  • isEnabled
    Global setting for enabling or disabling the cache

Instance Methods

Relationships

Conforming Types