AshCache.CachedRead (AshCache v0.1.0)

Copy Markdown View Source

One cached read action and its own settings: how long its entries live, whether empty results are kept, and what is passed to the store adapter.

Summary

Functions

The ttl a cached read, generic action or calculation actually uses: its own, else the block's.

Types

t()

@type t() :: %AshCache.CachedRead{
  __spark_metadata__: Spark.Dsl.Entity.spark_meta(),
  cache_empty?: boolean(),
  name: atom(),
  store_options: keyword(),
  ttl: pos_integer() | :infinity | nil
}

Functions

ttl(map, block_ttl)

@spec ttl(
  t() | AshCache.CachedAction.t() | AshCache.CachedCalculation.t(),
  pos_integer() | :infinity
) ::
  pos_integer() | :infinity

The ttl a cached read, generic action or calculation actually uses: its own, else the block's.