Updated: Comment #0
Problem/Motivation
According to documentation:
This hook asks your module to clear all of its static caches, in order to ensure a clean environment for subsequently invoked data rebuilds.
We do not invoke data rebuilds by system_cron() but drupal_flush_all_caches().
Proposed resolution
Remove the invocation in system_cron().
Remaining tasks
Review, commit.
User interface changes
None.
API changes
hook_cache_flush() is not invoked by system_cron(). This is also the documented behavior:
This hook is invoked by drupal_flush_all_caches(). It runs before module data is updated and before hook_rebuild().
Related Issues
For 7.x and hook_flush_caches() #710874: Add optional argument to hook_flush_caches() so that cron runs can be identified
| Comment | File | Size | Author |
|---|---|---|---|
| remove_system_cron_cache_flush.patch | 468 bytes | olli |
Comments
Comment #1
catchHmm good catch. The line just below this handles garbage collection for cache bins, which is all hook_flush_caches() was originally intended for.
Comment #2
alexpottCommitted a4870dd and pushed to 8.x. Thanks!