Set updates the key/value store in memory Changes are not persisted until you call Save()
(key string, value interface{})
| 56 | // Set updates the key/value store in memory |
| 57 | // Changes are not persisted until you call Save() |
| 58 | func (k *Store) Set(key string, value interface{}) { |
| 59 | k.mu.Lock() |
| 60 | defer k.mu.Unlock() |
| 61 | |
| 62 | k.db[key] = value |
| 63 | k.logChange(setOperation, key, value) |
| 64 | } |
| 65 | |
| 66 | // Remove removes the key and its value from the store in memory |
| 67 | // Changes are not persisted until you call Save() |