rsspls
rsspls copied to clipboard
Regenerate when config has been changed
When the rsspls configuration file is changed, the feed is not always regenerated. For the rss to be regenerated, the website needs to have changed. Or you can delete the site's cache file. When I started using rsspls I struggled a bit with this.
While developing a feed config, it would be nice when the config changes, the feed is also regenerated. A simple strategy to do this is just to look at the last changed date of the config file. The problem with this is all sites would be regenerated, even when config and content of the site didn't change.
A beter approach would be to calculate a checksum of the feed-config (or better: only the selectors), and save the config-checksum to the feed's cache file. And when the checksum has changed between fetches, force fetch the sites HTML.
After developmen t, when the sites config are stable, this functionality wouldn't be used, but calculating a checksum, comparing and storing it wouldn't be very expensive operations.
Anyways, love to hear what you think, and if this is a good idea.
Yes I've run into this too, definitely needs addressing. Adding a checksum of the config into the cache seems like a reasonable approach.