Interface TwingCache

interface TwingCache {
    getTimestamp: ((key) => Promise<number>);
    load: ((key) => Promise<null | TwingTemplateNode>);
    write: ((key, content) => Promise<void>);


getTimestamp: ((key) => Promise<number>)

Returns the modification timestamp of a key.

Type declaration

    • (key): Promise<number>
    • Parameters

      • key: string

        The cache key

      Returns Promise<number>


The modification timestamp

load: ((key) => Promise<null | TwingTemplateNode>)

Loads a template AST from the cache.

Type declaration


The template AST

write: ((key, content) => Promise<void>)

Writes a template AST to the cache.

Type declaration

    • (key, content): Promise<void>
    • Parameters

      Returns Promise<void>

Generated using TypeDoc