(k string, x interface{}, d time.Duration)
| 65 | } |
| 66 | |
| 67 | func (wc *WatchCacheStore) Set(k string, x interface{}, d time.Duration) error { |
| 68 | if !wc.available { |
| 69 | return ErrorCacheNotAvilable |
| 70 | } |
| 71 | wc.cache.Set(k, x, d) |
| 72 | return nil |
| 73 | } |
| 74 | |
| 75 | func (wc *WatchCacheStore) SetDefault(k string, x interface{}) error { |
| 76 | return wc.Set(k, x, DefaultExpiration) |