Logs
Patchsets
Range Diff ↕ rd-120
1: 2cf56f0 ! 1: 26daea4 feat(pgs): lru cache for object info and special files
2: caace51 ! 2: b004b64 chore(pgs): use http cache clear event to rm lru cache for special files
Range Diff ↕ rd-122
1: 26daea4 = 1: 26daea4 feat(pgs): lru cache for object info and special files
2: b004b64 = 2: b004b64 chore(pgs): use http cache clear event to rm lru cache for special files
-: ------- > 3: 59f5618 refactor(pgs): store lru cache on web router
Range Diff ↕ rd-123
1: 26daea4 = 1: 26daea4 feat(pgs): lru cache for object info and special files
2: b004b64 = 2: b004b64 chore(pgs): use http cache clear event to rm lru cache for special files
3: 59f5618 = 3: 59f5618 refactor(pgs): store lru cache on web router
-: ------- > 4: ee12290 refactor(pgs): update minio lru and remove object info cache
Range-diff rd-120
- title
- feat(pgs): lru cache for object info and special files
- description
-
Patch changed
- old #1
2cf56f0
- new #1
26daea4
- title
- chore(pgs): use http cache clear event to rm lru cache for special files
- description
-
Patch changed
- old #2
caace51
- new #2
b004b64
1: 2cf56f0 ! 1: 26daea4 feat(pgs): lru cache for object info and special files
pkg/cache/cache.go
+package cache + +import ( + "log/slog" + "time" + + "github.com/picosh/utils" +) + +var CacheTimeout time.Duration + +func init() { + cacheDuration := utils.GetEnv("STORAGE_MINIO_CACHE_DURATION", "1m") + duration, err := time.ParseDuration(cacheDuration) + if err != nil { + slog.Error("Invalid STORAGE_MINIO_CACHE_DURATION value, using default 1m", "error", err) + duration = 1 * time.Minute + } + + CacheTimeout = duration +}
2: caace51 ! 2: b004b64 chore(pgs): use http cache clear event to rm lru cache for special files
pkg/cache/cache.go
+package cache + +import ( + "log/slog" + "time" + + "github.com/picosh/utils" +) + +var CacheTimeout time.Duration + +func init() { + cacheDuration := utils.GetEnv("STORAGE_MINIO_CACHE_DURATION", "1m") + duration, err := time.ParseDuration(cacheDuration) + if err != nil { + slog.Error("Invalid STORAGE_MINIO_CACHE_DURATION value, using default 1m", "error", err) + duration = 1 * time.Minute + } + + CacheTimeout = duration +}