@jacraig/request
    Preparing search index...

    Class Cache

    The Cache class is used to store objects in a persistent cache

    Index

    Constructors

    Methods

    • Clears the cache of all items Returns a promise that resolves when the operation is complete

      Returns Promise<void>

    • Gets an object from the cache by key and resets the expiration time if the object is set to sliding expiration key: The key of the object to get Returns a promise that resolves with the object

      Parameters

      • key: string

      Returns Promise<any>

    • Gets an object from the cache by key or creates it using the fallBack promise if it does not exist key: The key of the object to get or create fallBack: The promise to create the object if it does not exist options: The options to use when creating the object Returns a promise that resolves with the object

      Parameters

      Returns Promise<any>

    • Removes an object from the cache by key key: The key of the object to remove Returns a promise that resolves when the operation is complete

      Parameters

      • key: string

      Returns Promise<void>

    • Sets an object in the cache by key with the specified options key: The key to set the object with value: The value to set the object with entryOptions: The options to set the object with Returns a promise that resolves when the operation is complete

      Parameters

      Returns Promise<void>