Index: filter/dscache/ds.go |
diff --git a/filter/dscache/ds.go b/filter/dscache/ds.go |
index 36b308e4644e4ad7d7a2c0016ae04a31e311fded..e1495e8a0a56fafbed7efcfaca0da85d1067e499 100644 |
--- a/filter/dscache/ds.go |
+++ b/filter/dscache/ds.go |
@@ -87,7 +87,13 @@ func (d *dsCache) GetMulti(keys []*ds.Key, metas ds.MultiMetaGetter, cb ds.GetMu |
if toSave != nil { |
if shouldSave { // save |
- expSecs := metas.GetMetaDefault(i, CacheExpirationMeta, CacheTimeSeconds).(int64) |
+ mg := metas.GetSingle(i) |
+ v, err := ds.GetMetaDefault(mg, CacheExpirationMeta, CacheTimeSeconds) |
+ if err != nil { |
+ // TODO(riannucci): Not sure what to do with this. |
iannucci
2015/12/12 03:52:22
as in; this should basically never happen, but if
|
+ panic(err) |
+ } |
+ expSecs := v.(int64) |
toSave.SetFlags(uint32(ItemHasData)) |
toSave.SetExpiration(time.Duration(expSecs) * time.Second) |
toSave.SetValue(data) |