All checks were successful
CI / build (push) Successful in 54s
- Introduced constants for avatar cache limit and cleanup interval. - Implemented a background cleanup process to manage the avatar cache size, removing the oldest files when the limit is exceeded. - Updated the AvatarHandler to refresh the modification time of cached avatars for better cache management.
17 lines
289 B
Go
17 lines
289 B
Go
package api
|
|
|
|
import "time"
|
|
|
|
const (
|
|
CompressionLevel = 5
|
|
|
|
LegalDir = "legal"
|
|
PrivacyFile = "privacy.txt"
|
|
TermsFile = "terms.txt"
|
|
DisclaimerFile = "disclaimer.txt"
|
|
|
|
// Avatar Cache
|
|
AvatarCacheLimit = 100 * 1024 * 1024 // 100MB
|
|
AvatarCacheInterval = 1 * time.Hour
|
|
)
|