Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
at the moment recacher fetches the URLs that should be recached only if cron is executed. This introduces a not necessary latency. We've set up cron to run each minute but still within this minute users might need to wait for complex pages like views, that need some execution time.
It would be great and should be just some lines of code to write a rules integration. This would allow to trigger the already existing recacher functionalities immediately by an event like a node update.
I think this would be really helpful for a lot of users.
thanks
philipp
Comments
Comment #2
Vacilando CreditAttribution: Vacilando as a volunteer commentedI like the idea of Rules integration for Recacher.
My time for volunteering is scarce, so if anybody can provide at least an initial patch, it would speed things up.
Comment #3
Vacilando CreditAttribution: Vacilando as a volunteer commented@pBartels -- good thinking, but unfortunately it won't work that way. We are already detecting when a node is changed -- thanks to the Cache Expiration hook_expire_cache(). So we could fire a re-caching request immediately as we detect a node change.
The problem is that at that moment caches *most probably* are not yet expired. Esp. any external cache (Boost, Varnish, Akamai, ...) needs a certain time to receive the purge requests and process them. If we fired our re-caching request so soon, we would probably still hit the old cache.
So I think that for re-caching to work we always have to fire a request a little bit after the expiration. What time exactly is unclear (we would need confirmations about purge from all cache backends).
Until we find a better solution, the cron running every minute seems to be the best possible solution.
At least this is what I think; please correct me if I am wrong (and reopen this ticket).
Comment #4
Vacilando CreditAttribution: Vacilando as a volunteer commented@pBartels, see also #2828873: Optionally trigger recaching via hook_exit.