open_api_spex v3.9.0 OpenApiSpex.Plug.Cache behaviour View Source

Cache for OpenApiSpex

Settings:

config :open_api_spex, :cache_adapter, Module

There are already had three cache adapter:

  • OpenApiSpex.Plug.PersistentTermCache - default
  • OpenApiSpex.Plug.AppEnvCache - if VM not supported persistent_term
  • OpenApiSpex.Plug.NoneCache - none cache

If you are constantly modifying specs during development, you can setting like this in dev.exs:

config :open_api_spex, :cache_adapter, OpenApiSpex.Plug.NoneCache

Link to this section Summary

Functions

Get cache adapter

Only erase cache, put again when plug starting

Link to this section Functions

Get cache adapter

Link to this function

refresh() View Source
refresh() :: :ok

Only erase cache, put again when plug starting

Link to this section Callbacks