Documentation
    Preparing search index...

    Interface TwingCache

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

    Properties

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

    Returns the modification timestamp of a key.

    Type declaration

      • (key: string): Promise<number>
      • Parameters

        • key: string

          The cache key

        Returns Promise<number>

        The modification timestamp

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

    Loads a template AST from the cache.

    Type declaration

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

    Writes a template AST to the cache.

    Type declaration