MCPcopy Create free account
hub / github.com/DNAProject/DNA / getRespCacheValue

Function getRespCacheValue

p2pserver/message/utils/msg_handler.go:679–688  ·  view source on GitHub ↗

getRespCacheValue get response data from cache

(key string)

Source from the content-addressed store, hash-verified

677
678//getRespCacheValue get response data from cache
679func getRespCacheValue(key string) interface{} {
680 if respCache == nil {
681 return nil
682 }
683 data, ok := respCache.Get(key)
684 if ok {
685 return data
686 }
687 return nil
688}
689
690//saveRespCache save response msg to cache
691func saveRespCache(key string, value interface{}) bool {

Callers 1

DataReqHandleFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected