MCPcopy Index your code
hub / github.com/Preloading/TwitterAPIBridge / SetMultiple

Method SetMultiple

bridge/usercache.go:39–46  ·  view source on GitHub ↗

maybe not the most effiecent use of memory.

(keys []string, user TwitterUser)

Source from the content-addressed store, hash-verified

37
38// maybe not the most effiecent use of memory.
39func (c *Cache) SetMultiple(keys []string, user TwitterUser) {
40 c.mutex.Lock()
41 defer c.mutex.Unlock()
42 for _, key := range keys {
43 c.data[key] = user
44 go c.expireKeyAfterTTL(key)
45 }
46}
47
48func (c *Cache) expireKeyAfterTTL(key string) {
49 time.Sleep(c.ttl)

Callers 2

GetUserInfoFunction · 0.80
GetUsersInfoFunction · 0.80

Calls 1

expireKeyAfterTTLMethod · 0.95

Tested by

no test coverage detected