Class CacheControl<T>

Type Parameters

  • T

Hierarchy

  • CacheControl

Constructors

Properties

Disabled: boolean = false
memory: Map<Key, IRecord> = ...

Methods

  • Removes all items from the cache.

    Returns void

  • Returns the item with the given id.

    Parameters

    • id: Key

    Returns {
        data: T;
        found: boolean;
    }

    • data: T
    • found: boolean
  • Removes the item with the given id.

    Parameters

    • id: Key

    Returns void

  • Removes all items that match the callback. If callback returns true then the item is removed.

    Parameters

    • callback: ((key) => boolean)
        • (key): boolean
        • Parameters

          • key: Key

          Returns boolean

    Returns void

  • Removes all items that contain the given text.

    Parameters

    • text: Key

    Returns void

  • Removes all items that start with the given text.

    Parameters

    • text: Key

    Returns void

  • Sets item to cache.

    Parameters

    • params: {
          data: any;
          duration?: number;
          id: string;
          persistence?: Persistence;
      }
      • data: any
      • Optional duration?: number
      • id: string
      • Optional persistence?: Persistence

    Returns void

Generated using TypeDoc