Append appends entry under the key if key exists, otherwise it will set the key (same behaviour as Set()). With Append() you can concatenate multiple entries under the same key in an lock optimized way.
(key string, entry []byte)
| 156 | // it will set the key (same behaviour as Set()). With Append() you can |
| 157 | // concatenate multiple entries under the same key in an lock optimized way. |
| 158 | func (c *BigCache) Append(key string, entry []byte) error { |
| 159 | hashedKey := c.hash.Sum64(key) |
| 160 | shard := c.getShard(hashedKey) |
| 161 | return shard.append(key, hashedKey, entry) |
| 162 | } |
| 163 | |
| 164 | // Delete removes the key |
| 165 | func (c *BigCache) Delete(key string) error { |