diff --git a/mongodb/mongodb.go b/mongodb/mongodb.go index 80c9bf35..1787e3a2 100644 --- a/mongodb/mongodb.go +++ b/mongodb/mongodb.go @@ -120,6 +120,8 @@ func (s *Storage) Get(key string) ([]byte, error) { } // Set key with value, replace if document exits +// +// document will be remove automatically if exp is set, based on MongoDB TTL Indexes func (s *Storage) Set(key string, val []byte, exp time.Duration) error { filter := bson.M{"key": key} replace := MongoStorage{