MCPcopy Index your code
hub / github.com/fish2018/pansou / Set

Method Set

util/cache/memory_cache.go:36–38  ·  view source on GitHub ↗

设置缓存

(key string, data []byte, ttl time.Duration)

Source from the content-addressed store, hash-verified

34
35// 设置缓存
36func (c *MemoryCache) Set(key string, data []byte, ttl time.Duration) {
37 c.SetWithTimestamp(key, data, ttl, time.Now())
38}
39
40// SetWithTimestamp 设置缓存,并指定最后修改时间
41func (c *MemoryCache) SetWithTimestamp(key string, data []byte, ttl time.Duration, lastModified time.Time) {

Callers

nothing calls this directly

Calls 1

SetWithTimestampMethod · 0.95

Tested by

no test coverage detected