Skip to main content
Version: 6.4

FileCacheAdapter

Implements

Index

Constructors

constructor

  • new FileCacheAdapter(options: { cacheDir: string; combined?: string | boolean }, baseDir: string, pretty?: boolean): FileCacheAdapter
  • Parameters

    • options: { cacheDir: string; combined?: string | boolean }
      • cacheDir: string
      • optionalcombined: string | boolean
    • baseDir: string
    • pretty: boolean = false

    Returns FileCacheAdapter

Methods

clear

  • clear(): void
  • Clears all items stored in the cache.


    Returns void

combine

  • combine(): string | void
  • Generates a combined cache from all existing entries.


    Returns string | void

get

  • get(name: string): any
  • Gets the items under name key from the cache.


    Parameters

    • name: string

    Returns any

remove

  • remove(name: string): void
  • Removes the item from cache.


    Parameters

    • name: string

    Returns void

set

  • set(name: string, data: any, origin: string): void
  • Sets the item to the cache. origin is used for cache invalidation and should reflect the change in data.


    Parameters

    • name: string
    • data: any
    • origin: string

    Returns void