mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-15 10:43:55 -04:00
- Adds `cli/purge.php` so the purge policy can be applied from cron, mirroring `cli/db-optimize.php`. - Documents it in `cli/README.md`. Aims to be a small, contained answer to #3636: reuses the same `Feed::cleanOldEntries()` logic the GUI's "Purge now" button calls, packaged as a standard `cli/` script. Mirror the existing db-optimize.php pattern so administrators can run the purge policy on a schedule instead of waiting for the 1/30 random trigger in feedController, or clicking 'Purge now' in the GUI. The script applies the same archiving policy as the GUI button: per-feed attribute, per-category attribute, then user config; with the existing keep_favourites / keep_unreads / keep_labels / keep_min / keep_period / keep_max guards. With no policy configured, it is a no-op. Refs: https://github.com/FreshRSS/FreshRSS/issues/3636 Co-authored-by: Bjørn A. Andersen <polybjorn@users.noreply.github.com>
1.0 KiB
Executable File
1.0 KiB
Executable File