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