Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var PackageProps = packageprops.Props{ WASMWASI: packageprops.WASMCompiles, WASMJS: packageprops.WASMCompiles, WASMFreestanding: packageprops.WASMCompiles, }
PackageProps records this package's curated properties (ADR-0080). Seeded by `wasmsurvey props generate`; curate by hand, then `wasmsurvey props verify`.
Functions ¶
This section is empty.
Types ¶
type CHCache ¶
type CHCache struct {
// contains filtered or unexported fields
}
CHCache implements CompiledQueryCache using a ClickHouse MergeTree table for persistence and an in-memory map for fast reads. The table is created automatically on first use.
The cache is keyed by the template hash (the cache_key). Writes go to both the in-memory map and ClickHouse. Reads hit memory first, falling back to ClickHouse on miss (cold start after proxy restart).
Usage:
cache := orchestrator.NewCHCache(chClient, "default", "compiled_query_cache") err := cache.Init(ctx)
func NewCHCache ¶
func NewCHCache(ch orchestrator.CHClientI, database, table string) *CHCache
NewCHCache creates a ClickHouse-backed cache.
func (*CHCache) Get ¶
func (inst *CHCache) Get(key string) (entry *orchestrator.CacheEntry, found bool)
Get retrieves a cache entry by key. Checks memory first, then ClickHouse.
func (*CHCache) Init ¶
Init creates the cache table if it doesn't exist and loads existing entries into the in-memory map. Must be called before Get/Put.
func (*CHCache) Put ¶
func (inst *CHCache) Put(key string, entry *orchestrator.CacheEntry)
Put stores or invalidates a cache entry. A nil entry invalidates the key.