OpenApiSpex.Plug.Cache behaviour (open_api_spex v3.10.0) View Source
Cache for OpenApiSpex
Settings:
config :open_api_spex, :cache_adapter, ModuleThere are already had three cache adapter:
OpenApiSpex.Plug.PersistentTermCache- defaultOpenApiSpex.Plug.AppEnvCache- if VM not supportedpersistent_termOpenApiSpex.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
Link to this section Functions
Specs
adapter() :: module()
Get cache adapter
Specs
refresh() :: :ok
Only erase cache, put again when plug starting
Link to this section Callbacks
Specs
erase(module()) :: :ok
Specs
get(module()) :: {OpenApiSpex.OpenApi.t(), map()} | nil
Specs
put(module(), {OpenApiSpex.OpenApi.t(), map()}) :: :ok