Index: impl/memory/memcache.go |
diff --git a/impl/memory/memcache.go b/impl/memory/memcache.go |
index 4a38c026a0fc3a06d9859e2d431f86fb8c5fea09..1892129f024c5b2da307fc99e90c41cd5b43b3e6 100644 |
--- a/impl/memory/memcache.go |
+++ b/impl/memory/memcache.go |
@@ -50,7 +50,13 @@ func (m *mcItem) SetExpiration(exp time.Duration) mc.Item { |
} |
func (m *mcItem) SetAll(other mc.Item) { |
- *m = *other.(*mcItem) |
+ if other == nil { |
+ *m = mcItem{key: m.key} |
+ } else { |
+ k := m.key |
+ *m = *other.(*mcItem) |
+ m.key = k |
+ } |
} |
type mcDataItem struct { |
@@ -200,7 +206,7 @@ func (m *memcacheImpl) AddMulti(items []mc.Item, cb mc.RawCB) error { |
m.data.setItemLocked(now, itm) |
return nil |
} else { |
- return (mc.ErrNotStored) |
+ return mc.ErrNotStored |
} |
}) |
return nil |