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.
Hi,
Please consider adding cache cleaning options with cron runs such that admins can configuring clearing of cache after 24-48-36 hours.
Thanks
Rugman
Comments
Comment #1
willvincent CreditAttribution: willvincent commentedThis seems like it might be better suited to contrib. But I think the idea has merit
Comment #2
willvincent CreditAttribution: willvincent commentedActually.. isn't cache_clear_all() called on cron run already?
Comment #3
Rugman CreditAttribution: Rugman commentedThanks for reply(s),
No, I don't experience cache clearance on automatic/manual cron runs (As far as my little knowledge is concerned) :-)
Atleast the cache tables are not empty as it happens when manually clearing caches.
Regards,
Rugman
Comment #4
willvincent CreditAttribution: willvincent commentedThis is what's in system_cron()
Since it's passing in NULL for the cid though, this would only clear entries that have been or can be expired.
It seems to me best suited to contrib as I don't believe it's something that would be used widely enough to warrant inclusion in core. On the other hand, if it is something that should be included in core, rolling a contrib module of this sort into core wouldn't be a huge issue. The other bonus to doing this as contrib is that it would benefit you now, rather than having to wait for D8 to come out, and a 'maybe it gets backported to D7'.
So, I'm going to look into doing at this as a contrib project. That will give me something to work on in my hotel room tonight, and potentially on my flight back home tomorrow (if I don't finish it tonight.)
Comment #5
willvincent CreditAttribution: willvincent commentedHere's a sandbox project to do this in D7.
http://drupal.org/sandbox/tcindie/1733538
Comment #6
Rugman CreditAttribution: Rugman commentedWOW !!!
Wish I could create project like you did in a jiffy :-)
Thanks, Look ahead for Dev release of this. Don't know how to use it from Git release :-(
Regards,
Rugman
Comment #7
willvincent CreditAttribution: willvincent commentedHmm.. instructions for that are on the 'version control' tab for all projects and sandbox projects.. but ... http://drupal.org/project/cron_cache
Switching to postponed, as I think this is probably best addressed with contrib, but a core maintainer can make the final call.
Comment #8
willvincent CreditAttribution: willvincent commentedThis has been sitting out here for a while.
Closing it, as I wrote a simple contrib module to accomplish the desired goal. Re-open if needed.