feat(cache): 启用缓存过期机制 #2

Merged
mrxiaozhuox merged 1 commits from feature/cache-expiration into main 2026-06-08 18:50:36 +08:00

1 Commits

Author SHA1 Message Date
818ad69ce7 feat(cache): enable cache expiration with TTL support
- UserInfoCache now supports configurable TTL (default 24h)
- get(UUID) returns null and removes expired entries automatically
- cleanup() method is now enabled for batch cleanup
- Added scheduled cleanup task in MinerooCore (every 10 minutes)
- Added size(), clear(), and getIfPresent() helper methods

This fixes potential memory leaks from never-expiring cache entries.
2026-06-08 18:48:34 +08:00