kura_query_cache (kura v2.0.6)
View SourceETS-based cache for compiled query results.
Caches {SQL, Params} tuples keyed by {RepoMod, QueryHash} so two
repos with different dialects don't share entries. Identical queries
through the same repo skip recompilation.
The ETS table is owned by kura_query_cache_owner (a gen_server under
kura_sup), so the table survives any caller exiting.
Summary
Functions
Look up a cached compiled query by key.
Initialize the query cache ETS table. No-op when the cache owner is already running (the normal app-startup path). Used by tests that exercise the cache without starting the kura app.
Store a compiled query result for a key.
Functions
Look up a cached compiled query by key.
-spec init() -> ok.
Initialize the query cache ETS table. No-op when the cache owner is already running (the normal app-startup path). Used by tests that exercise the cache without starting the kura app.
-spec init([]) -> {ok, []}.
Store a compiled query result for a key.
-spec start_link() -> gen_server:start_ret().