mirror of
https://github.com/gofiber/storage.git
synced 2025-10-05 08:37:10 +08:00
📝 update Set docs
This commit is contained in:
@@ -120,6 +120,8 @@ func (s *Storage) Get(key string) ([]byte, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set key with value, replace if document exits
|
// 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 {
|
func (s *Storage) Set(key string, val []byte, exp time.Duration) error {
|
||||||
filter := bson.M{"key": key}
|
filter := bson.M{"key": key}
|
||||||
replace := MongoStorage{
|
replace := MongoStorage{
|
||||||
|
Reference in New Issue
Block a user