SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
Set redis key ttl with entry.TTLSec
byungjo.yoon58fd2e5a1941
diff --git a/weed/filer2/redis/universal_redis_store.go b/weed/filer2/redis/universal_redis_store.goindex a5d57b598b..c7daf10428 100644--- a/weed/filer2/redis/universal_redis_store.go+++ b/weed/filer2/redis/universal_redis_store.go@@ -7,6 +7,7 @@ import ("github.com/go-redis/redis""sort""strings"+ "time")const (@@ -24,7 +25,7 @@ func (store *UniversalRedisStore) InsertEntry(entry *filer2.Entry) (err error) {return fmt.Errorf("encoding %s %+v: %v", entry.FullPath, entry.Attr, err)}- _, err = store.Client.Set(string(entry.FullPath), value, 0).Result()+ _, err = store.Client.Set(string(entry.FullPath), value, time.Duration(entry.TtlSec) * time.Second).Result()if err != nil {return fmt.Errorf("persisting %s : %v", entry.FullPath, err)