-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add smart cache protection for active apps #26
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
User reported that cache cleanup was deleting login sessions and preferences from actively used applications.
Solution
Implement multi-layer cache protection:
- Protect installed apps' caches (from /Applications)
- Protect running apps' caches (via lsappinfo)
- Protect recently used caches (within MAC_OPS_CACHE_RECENT_DAYS, default: 3 days)
- Only clean orphan caches from uninstalled/inactive apps older than MAC_OPS_CACHE_MAX_AGE_DAYS (default: 7 days)
Changes
- Add MAC_OPS_CACHE_RECENT_DAYS environment variable (default: 3)
- Collect installed app bundle IDs from /Applications
- Collect running app bundle IDs via lsappinfo
- Skip cache cleanup for protected apps
- Update README with configuration documentation and protection policy
Impact
- Prevents accidental deletion of login sessions, preferences, and active app data
- Only cleans truly orphaned caches from removed applications
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request