MCPcopy
hub / github.com/apache/answer / cleanCache

Method cleanCache

plugin/kv_storage.go:127–135  ·  view source on GitHub ↗
(ctx context.Context, params KVParams)

Source from the content-addressed store, hash-verified

125}
126
127func (kv *KVOperator) cleanCache(ctx context.Context, params KVParams) {
128 if kv.cacheTTL < 0 {
129 return
130 }
131
132 if err := kv.data.Cache.Del(ctx, kv.getCacheKey(params)); err != nil {
133 log.Warnf("Failed to delete cache for key %s: %v", params.Key, err)
134 }
135}
136
137// Get retrieves a value from KV storage by group and key.
138// Returns the value as a string or an error if the key is not found.

Callers 2

SetMethod · 0.95
DelMethod · 0.95

Calls 2

getCacheKeyMethod · 0.95
DelMethod · 0.65

Tested by

no test coverage detected