Metastatic. Cache behaviour
(Metastatic v0.28.0)
View Source
AST Caching behaviour and dispatcher for Metastatic.
Caches the results of parsing and abstracting source code to MetaAST (M2).
Supports multiple backends (ETS, DLLB), configured via :metastatic, :cache.
Default backend is :ets.
Summary
Functions
Clear all cached entries from the active cache backend.
Get cached abstraction result (MetaAST + Metadata) for a source code string and language.
Return the configured cache implementation module.
Initialize the active cache backend. Called automatically during application startup.
Store abstraction result in cache.
Callbacks
@callback clear() :: :ok
@callback init() :: :ok
Functions
@spec clear() :: :ok
Clear all cached entries from the active cache backend.
Get cached abstraction result (MetaAST + Metadata) for a source code string and language.
@spec impl() :: module()
Return the configured cache implementation module.
Options for :metastatic, :cache are:
:ets(default) ->Metastatic.Cache.ETS:dllb->Metastatic.Cache.DLLB- A module implementing
Metastatic.Cache
@spec init() :: :ok
Initialize the active cache backend. Called automatically during application startup.
Store abstraction result in cache.