Enum to describe the different cache modes.

Enumeration Members

Enumeration Members

NEXT_CALL: "next-call"

Cache Mode: NEXT_CALL

Pro(s):

  • The OpenAPI will always be up-to-date. Each new service detection prompts a clear cache, not renewal though.

Con(s):

  • The first call might be a bit slower due to updating process.
REFRESH: "refresh"

Cache Mode: REFRESH

Pro(s):

  • Provides faster response on the first call because cache regenerates whenever a new service is detected.

Con(s):

  • More CPU usage, often significantly, if aliases/services are refreshed frequently.
TIMEOUT: "timeout"

Cache Mode: TIMEOUT

Pro(s):

  • Designed mindful of CPU usage, it only clears cache on timeouts (default 10 mins).

Con(s):

  • Not ideal for dynamic servers due to its completely time-based cache clearing policy.
  • The OpenAPI might not be up-to-date all the time.