{"version":3,"file":"CacheModuleConfig.mjs","names":[],"sources":["../../../src/modules/cache/CacheModuleConfig.ts"],"sourcesContent":["import type { Cache } from './Cache'\n\n/**\n * CacheModuleConfigOptions defines the interface for the options of the CacheModuleConfig class.\n */\nexport interface CacheModuleConfigOptions {\n  /**\n   *\n   * Implementation of the {@link Cache} interface.\n   *\n   */\n  cache: Cache\n\n  /**\n   *\n   * @default 60\n   *\n   */\n  defaultExpiryInSeconds?: number\n\n  /**\n   *\n   * Uses a caching registry before talking to the storage service when a Record has the `useCache` set to `true`\n   *\n   * @default false\n   *\n   */\n  useCachedStorageService?: boolean\n}\n\nexport class CacheModuleConfig {\n  private options: CacheModuleConfigOptions\n\n  public constructor(options: CacheModuleConfigOptions) {\n    this.options = options\n  }\n\n  /** See {@link CacheModuleConfigOptions.cache} */\n  public get cache() {\n    return this.options.cache\n  }\n\n  /** See {@link CacheModuleConfigOptions.defaultExpiryInSeconds} */\n  public get defaultExpiryInSeconds() {\n    return this.options.defaultExpiryInSeconds ?? 60\n  }\n\n  /** See {@link CacheModuleConfigOptions.useCachedStorageService} */\n  public get useCachedStorageService() {\n    return this.options.useCachedStorageService ?? false\n  }\n}\n"],"mappings":";;;AA8BA,IAAa,oBAAb,MAA+B;CAG7B,AAAO,YAAY,SAAmC;AACpD,OAAK,UAAU;;;CAIjB,IAAW,QAAQ;AACjB,SAAO,KAAK,QAAQ;;;CAItB,IAAW,yBAAyB;AAClC,SAAO,KAAK,QAAQ,0BAA0B;;;CAIhD,IAAW,0BAA0B;AACnC,SAAO,KAAK,QAAQ,2BAA2B"}