Documentation
    Preparing search index...

    Interface TwingSynchronousCache

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

    Properties

    getTimestamp: (key: string) => number

    Returns the modification timestamp of a key.

    Type declaration

      • (key: string): 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