store: remove write TTL & expiry options (#1960)

This commit is contained in:
ben-toogood 2020-08-21 09:35:53 +01:00 committed by Vasiliy Tolstov
parent 218598e490
commit efac477059

View File

@ -330,13 +330,6 @@ func (m *fileStore) Write(r *store.Record, opts ...store.WriteOption) error {
newRecord.Metadata = make(map[string]interface{})
newRecord.Expiry = r.Expiry
if !writeOpts.Expiry.IsZero() {
newRecord.Expiry = time.Until(writeOpts.Expiry)
}
if writeOpts.TTL != 0 {
newRecord.Expiry = writeOpts.TTL
}
for k, v := range r.Metadata {
newRecord.Metadata[k] = v
}