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

Method cacheDiff

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

Source from the content-addressed store, hash-verified

200}
201
202func (s *CacheHandler) cacheDiff(ctx context.Context, path string) (*cacheDiff, bool) {
203 log.Logger(ctx).Debug("Looking for cacheDiff for " + path)
204 if c, ok := s.getCtxCache(ctx).GetBytes(cacheDiffPrefix + path); ok {
205 var diff *cacheDiff
206 if ee := json.Unmarshal(c, &diff); ee == nil {
207 log.Logger(ctx).Debug("SyncCache cacheDiff for "+path, zap.Any("adds", diff.Adds), zap.Any("deletes", diff.Deletes))
208 return diff, true
209 }
210 }
211 return nil, false
212}
213
214func (s *CacheHandler) CreateNode(ctx context.Context, in *tree.CreateNodeRequest, opts ...grpc.CallOption) (*tree.CreateNodeResponse, error) {
215 r, e := s.Next.CreateNode(ctx, in, opts...)

Callers 3

cacheEventMethod · 0.95
ListNodesMethod · 0.95
ReadNodeMethod · 0.95

Calls 5

getCtxCacheMethod · 0.95
LoggerFunction · 0.92
DebugMethod · 0.65
GetBytesMethod · 0.65
UnmarshalMethod · 0.65

Tested by

no test coverage detected