ThemeParks.wiki Parks API - v2.0.0
    Preparing search index...

    Function cacheSecondsFromEnv

    • A cache lifetime set in the environment for one decorated method.

      {CLASSNAME}_{METHODNAME}_CACHESECONDS, or {PREFIX}_{METHODNAME}_CACHESECONDS for a prefix registered with addConfigPrefix(), replaces the ttlSeconds of a @cache method and the cacheSeconds of an @http method at call time. 0 stops caching. A @cache callback keeps deriving its own lifetime. An entry already in the cache is served until it expires.

      Parameters

      • instance: any
      • methodName: string

      Returns number | undefined

      The lifetime in seconds, or undefined when the variable is unset or not a non-negative number