ExBifrost.Api.Cache (ex_bifrost v0.1.0)

Copy Markdown View Source

API calls for all endpoints tagged Cache.

Summary

Functions

Clear cache entry by cache ID Deletes a single cache entry by its storage ID. Read the cache ID from extra_fields.cache_debug.cache_id on a prior response — it is populated on both cache hits and cache misses.

Clear cache by cache key Clears a cache entry by its direct cache key.

Functions

clear_cache_by_cache_id(connection, cache_id, opts \\ [])

@spec clear_cache_by_cache_id(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, ExBifrost.Model.ClearCacheResponse.t()}
  | {:error, Tesla.Env.t()}

Clear cache entry by cache ID Deletes a single cache entry by its storage ID. Read the cache ID from extra_fields.cache_debug.cache_id on a prior response — it is populated on both cache hits and cache misses.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • cache_id (String.t): Storage ID of the cache entry to delete
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.ClearCacheResponse.t} on success
  • {:error, Tesla.Env.t} on failure

clear_cache_by_cache_key(connection, cache_key, opts \\ [])

@spec clear_cache_by_cache_key(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExBifrost.Model.BifrostError.t()}
  | {:ok, ExBifrost.Model.ClearCacheResponse.t()}
  | {:error, Tesla.Env.t()}

Clear cache by cache key Clears a cache entry by its direct cache key.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • cache_key (String.t): Cache key to clear
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.ClearCacheResponse.t} on success
  • {:error, Tesla.Env.t} on failure