MCPcopy Create free account
hub / github.com/53AI/53AIHub / InitLibraryCacheInvalidator

Function InitLibraryCacheInvalidator

api/service/library_cache.go:19–24  ·  view source on GitHub ↗

InitLibraryCacheInvalidator wires the model-level library cache invalidation hook.

()

Source from the content-addressed store, hash-verified

17
18// InitLibraryCacheInvalidator wires the model-level library cache invalidation hook.
19func InitLibraryCacheInvalidator() {
20 librarySnapshotCacheInvalidatorOnce.Do(func() {
21 model.SetLibraryCacheInvalidator(invalidateLibrarySnapshotCache)
22 model.SetLibraryCacheLoader(loadLibrariesSnapshotWithCache)
23 })
24}
25
26func loadLibrariesSnapshotWithCache(eid int64) ([]model.Library, error) {
27 if eid <= 0 {

Callers

nothing calls this directly

Calls 1

DoMethod · 0.65

Tested by

no test coverage detected