A class allowing access to MakerSuite prompts that have been saved in Google Drive. MakerSuite prompts are pulled based on their Google Drive ID (which is available from Google Drive or as part of the URL when the prompt is open in MakerSuite). There is a basic cache that will store the prompt in memory for a time specified in milliseconds. This defaults to 0, indicating the prompt should always be pulled from Google Drive.

Constructors

Properties

Methods

Constructors

Properties

cache: Record<string, CacheEntry> = {}
cacheTimeout: number
caller: AsyncCaller

Methods

  • Is the current cache entry valid, or does it need to be refreshed. It will need to be refreshed under any of the following conditions:

    • It does not currently exist in the cache
    • The cacheTimeout is 0
    • The cache was last updated longer ago than the cacheTimeout allows

    Parameters

    • entry: CacheEntry

      The cache entry, including when this prompt was last refreshed

    Returns boolean

Generated using TypeDoc