(key []byte)
| 142 | } |
| 143 | |
| 144 | func (b *FastCache) Get(key []byte) ([]byte, error) { |
| 145 | v := b.c.Get(nil, key) |
| 146 | if v == nil || len(v) == 0 { |
| 147 | return nil, errKeyNotFound |
| 148 | } |
| 149 | |
| 150 | return v, nil |
| 151 | } |
| 152 | |
| 153 | func (b *FastCache) Set(key, value []byte) error { |
| 154 | b.c.Set(key, value) |