🐛 Fix crash on maintain cache

This commit is contained in:
2024-08-18 22:45:35 +08:00
parent d2ff4087e5
commit 02f6ad9020
2 changed files with 6 additions and 5 deletions

View File

@ -197,9 +197,9 @@ func DeleteAttachment(item models.Attachment) error {
}
func MaintainAttachmentCache() {
var keySet []uint
var keySet []any
metadataCache.Range(func(k any, v any) bool {
keySet = append(keySet, k.(uint))
keySet = append(keySet, k)
return true
})
if len(keySet) > metadataCacheLimit {