MCPcopy
hub / github.com/grafana/tempo / store

Method store

modules/frontend/pipeline/sync_handler_cache.go:143–157  ·  view source on GitHub ↗

store stores the response body in the cache. the caller assumes the responsibility of closing the response body

(ctx context.Context, key string, buffer []byte)

Source from the content-addressed store, hash-verified

141
142// store stores the response body in the cache. the caller assumes the responsibility of closing the response body
143func (c *frontendCache) store(ctx context.Context, key string, buffer []byte) {
144 if c.c == nil {
145 return
146 }
147
148 if key == "" {
149 return
150 }
151
152 if len(buffer) == 0 {
153 return
154 }
155
156 c.c.Store(ctx, []string{key}, [][]byte{buffer})
157}
158
159// fetch fetches the response body from the cache. the caller assumes the responsibility of closing the response body.
160func (c *frontendCache) fetchBytes(ctx context.Context, key string) []byte {

Callers 2

TestCacheCachesFunction · 0.80
RoundTripMethod · 0.80

Calls 1

StoreMethod · 0.65

Tested by 1

TestCacheCachesFunction · 0.64