Interface TwingSynchronousCache

interface TwingSynchronousCache {
    getTimestamp: ((key: string) => number);
    load: ((key: string) => null | TwingTemplateNode);
    write: ((key: string, content: TwingTemplateNode) => void);
}

Properties

getTimestamp: ((key: string) => number)

Returns the modification timestamp of a key.

Type declaration

    • (key): number
    • Parameters

      • key: string

        The cache key

      Returns number

      The modification timestamp

load: ((key: string) => null | TwingTemplateNode)

Loads a template AST from the cache.

Type declaration

write: ((key: string, content: TwingTemplateNode) => void)

Writes a template AST to the cache.

Type declaration

    • (key, content): void
    • Parameters

      Returns void