MCPcopy Create free account
hub / github.com/Edgio/vflow / insert

Method insert

ipfix/memcache.go:94–99  ·  view source on GitHub ↗
(id uint16, addr net.IP, tr TemplateRecord)

Source from the content-addressed store, hash-verified

92}
93
94func (m MemCache) insert(id uint16, addr net.IP, tr TemplateRecord) {
95 shard, key := m.getShard(id, addr)
96 shard.Lock()
97 defer shard.Unlock()
98 shard.Templates[key] = Data{tr, time.Now().Unix()}
99}
100
101func (m MemCache) retrieve(id uint16, addr net.IP) (TemplateRecord, bool) {
102 shard, key := m.getShard(id, addr)

Callers 4

decodeSetMethod · 0.45
RPCFunction · 0.45
TestMemCacheInsertFunction · 0.45
TestMemCacheAllSetIdsFunction · 0.45

Calls 1

getShardMethod · 0.95

Tested by 2

TestMemCacheInsertFunction · 0.36
TestMemCacheAllSetIdsFunction · 0.36