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

Method cacheGet

common/nodes/sync/handler-sync-cache.go:192–200  ·  view source on GitHub ↗
(ctx context.Context, path string)

Source from the content-addressed store, hash-verified

190}
191
192func (s *CacheHandler) cacheGet(ctx context.Context, path string) (*tree.Node, bool) {
193 if c, ok := s.getCtxCache(ctx).GetBytes(cacheNodePrefix + path); ok {
194 var dir *tree.Node
195 if ee := json.Unmarshal(c, &dir); ee == nil {
196 return dir, true
197 }
198 }
199 return nil, false
200}
201
202func (s *CacheHandler) cacheDiff(ctx context.Context, path string) (*cacheDiff, bool) {
203 log.Logger(ctx).Debug("Looking for cacheDiff for " + path)

Callers 2

ListNodesMethod · 0.95
ReadNodeMethod · 0.95

Calls 3

getCtxCacheMethod · 0.95
GetBytesMethod · 0.65
UnmarshalMethod · 0.65

Tested by

no test coverage detected