MCPcopy Create free account
hub / github.com/pydio/cells / GetCache

Method GetCache

common/runtime/manager/manager.go:412–422  ·  view source on GitHub ↗
(ctx context.Context, name string, resolutionData map[string]interface{})

Source from the content-addressed store, hash-verified

410}
411
412func (m *manager) GetCache(ctx context.Context, name string, resolutionData map[string]interface{}) (cache.Cache, error) {
413 item, err := m.internalRegistry.Get("cache-"+name, registry.WithType(pb.ItemType_GENERIC))
414 if err != nil {
415 return nil, errors.Wrap(err, "cannot get cache-"+name+" from registry")
416 }
417 var pool *openurl.Pool[cache.Cache]
418 if ok := item.As(&pool); !ok {
419 return nil, errors.New("wrong registry item format for cache-" + name)
420 }
421 return pool.Get(ctx, resolutionData)
422}
423
424func (m *manager) initNamespace(ctx context.Context, bootstrap config.Store, base string) error {
425 m.ns = bootstrap.Val(base, "runtime").Default(m.ns).String()

Callers

nothing calls this directly

Calls 5

WithTypeFunction · 0.92
GetMethod · 0.65
AsMethod · 0.65
NewMethod · 0.65
WrapMethod · 0.45

Tested by

no test coverage detected