catalogrule/observer::dailyCatalogUpdate
called by the catalogrule_apply_all
cron job will delete block caches every night:
What's wrong with this?
- It shouldn't do this if there are no catalog rules in the first place.
- Even if there are catalog rules it should check if the current execution time is close to any job's start or stop date and only flush caches then.
- The configuration (https://github.com/OpenMage/magento-mirror/blob/magento-1.9/app/code/core/Mage/CatalogRule/etc/config.xml#L102-104) basically only allows adding caches, but not removing any caches.
- Cleaning caches - if actually required - should happen after reindexing. It's not safe to assume that noone will hit any affected page after it was cleaned and before the indexers are done.
- How will full page cache implementations and other proxies (e.g Varnish) be able to update/purge their caches? I guess a separate event should be dispatched here...