add auto clear cache for ios#2283
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7305ea244c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| Task { @MainActor in | ||
| UserDefaults.standard.set(now, forKey: lastVideoCheckKey) |
There was a problem hiding this comment.
Recheck the video cache after sub-limit scans
Because lastVideoCheckKey is updated even when the cache is still below videoCacheLimit, any later growth during the next 24 hours is skipped by the guard above. For example, if the user briefly backgrounds with a small GSPlayer cache, then keeps scrolling/autoplaying enough videos to add several GB, subsequent background transitions that day return before measuring the cache, so the configured limit is not enforced until the next day; only throttle after a cleanup or use a shorter retry when no cleanup happened.
Useful? React with 👍 / 👎.
fix #2083