ReqLLM.Schema.EvictionStrategy behaviour (ReqLLM v1.28.0)

View Source

Selects an entry to remove from the JSON Schema validator cache.

ReqLLM owns the cache, enforces its memory limit, and performs eviction. A strategy receives cache metadata and selects one entry. It does not receive the compiled validator or the ETS table.

Summary

Types

entry()

@type entry() :: %{schema: map(), inserted_at: integer(), last_access: integer()}

Callbacks

select_victim(list)

@callback select_victim([entry(), ...]) :: entry()