Problem/Motivation
The cache_path cache bin is not cleaned up when the rest of the caches are. This causes the store for this cache (usually DB) to grow infinitely.
Proposed resolution
Commit patch to core which clears cache_path when the other caches are cleared. This is in the drupal_flush_all_caches() and system_cron() functions. Also, commit a cache flush test.
Remaining tasks
Patch #12 has been reviewed and tested and needs to be committed.
User interface changes
None.
API changes
None.
Original report by Akaoni
Originally reported by hijacking this issue:
http://drupal.org/node/902736#comment-4836630
Oops!!
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | core-cache_path_cleanup-1259096-12.patch | 2.43 KB | Akaoni |
| #5 | core-cache_path_cleanup-1259096-5.patch | 2.43 KB | Akaoni |
| #2 | core-test_flush_all_caches-1259096-2.patch | 1.23 KB | Akaoni |
| #1 | core-cache_path_cleanup-1259096-1.patch | 1.2 KB | Akaoni |
Comments
Comment #1
Akaoni commentedChecking if old patch still works against 8.x-dev.
Comment #2
Akaoni commentedRerolled and moved dereine's test patch.
This patch should fail.
Comment #4
Akaoni commentedComment #5
Akaoni commentedFix and test combined patch.
Comment #5.0
Akaoni commentedAdded patch #.
Comment #5.1
Akaoni commentedAdded possible test path.
Comment #5.2
Akaoni commentedUpdated possible test path.
Comment #5.3
karschsp commentedUpdating test steps to include creating nodes with custom path aliases.
Comment #6
karschsp commentedWorks as advertised.
Comment #7
karschsp commentedSetting back to Needs Review so we can get a couple more people to take a look.
Comment #8
Akaoni commented@karschsp: Thanks for your help, mate!!! ; )
Comment #9
catchdrupal_flush_all_caches - this could do with being drupal_flush_all_caches().
Comment #10
crashtest_ commentedI tested as stated above, and reviewed the patch code. The patch applied fine, and testing produced the result of the cache_path table being cleared on the "Clear all caches" button being clicked, where prior to applying the patch, the same action didn't clear that table.
Looks great to me!
Pat
Comment #11
Akaoni commented@catch: Good pickup.
Will make sure to update this in the comments once it's had another test or two.@CrashTest_: You rock!! Thanks for testing!! ; )
Comment #12
Akaoni commentedNew patch with catch's comment suggestion (functionally the same as #5).
Comment #13
catchLooks good.
Comment #14
Akaoni commentedThanks, catch!! ;)
Comment #14.0
Akaoni commentedUpdated test path.
Comment #16
Akaoni commentedMust be some kind of testing oddity.
#12: core-cache_path_cleanup-1259096-12.patch queued for re-testing.
Comment #17
catchThe test failure looked completely unrelated (fatal error in form required values), back to RTBC.
Comment #18
dries commentedGood catch. Committed to 7.x and 8.x. Thanks.
Comment #19.0
(not verified) commentedUpdated remaining tasks.