I feel this is a critical issue, but I'm sort of on the fence about it so if the community decides it isn't feel free to change it :)

I recently upgraded several sites from 5.x-beta2 -> 5.x-RC1. One of the changes in RC1 was the new CSS aggregation functionality and a change to the page that once only held the page caching options.

I noticed that after the upgrade the option still read "page caching" when it should have been "performance". If you clicked the page caching link it took you to a blank page. If you grabbed the link for the "performance" option from a fresh install of RC1 and used that then what got returned with a page that had all of the system config options on it, not the performance screen.

After some troubleshooting I finally learned that the problem was that the menus were cached. I went into the database and cleared the three cache tables (menu, pages and blocks I think?) and that did the trick - the option now showed up correctly and worked correctly.

There could be other cases where this could cause havoc and without knowledge of how the caching works or regular use of the devel module to clear cache a regular user wouldn't have any way to resolve this.

Therefore I'd like to suggest that any time update.php is run, the cache for that site should be cleared. If a release update introduces something new, or changes something this could be a problem for users as I described above.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

moshe weitzman’s picture

yes, this is critical, and rebuild all caches after update.php is wise.

ChrisKennedy’s picture

Status: Active » Needs review
FileSize
902 bytes

Agreed that this needs to be fixed, I've had the lack of a cache clear bite me several times as well. Patch attached.

Dries’s picture

Status: Needs review » Needs work

That is only going to clear the page cache, and not the menu cache. We'll want to clear the menu cache (and not necessarily the page cache).

Steven’s picture

Well, afaict the current cache system is a bit broken, as there is no way to know which specialized cache tables are being used. So this means, with the exception of the page cache as the default case, all other modules/code need to ensure their own cache clearing.

Two things:
- We already had a page cache clearing in update.php before. It seems that it got lost... it should be re-added regardless of this problem.
- Because we don't want to wipe the menu cache every time the page cache is updated, we'll simply hardcode another call to cache_clear_all('cache_menu'); (or whatever the syntax is) to update.php.

rbrooks00’s picture

The other one was fliter, not blocks. Not sure if that one is as important, but it seems like we'd want to clear any cache out there with update.php.

moshe weitzman’s picture

we need a hook where modules can take action on cache_clear_all(). modules will want to clear too.

BioALIEN’s picture

This issue bit me a few times during my upgrade process too.
It can be potentially confusing for future changes so +1 to the general idea.

Dries’s picture

For now, let's just hardcode a couple more cache clears in update.php. We can wonder about such hook later.

ChrisKennedy’s picture

Status: Needs work » Needs review
FileSize
1.19 KB

Here is a patch that clears cache, cache_page, cache_menu, and cache_filter. The reason that the cache was no longer cleared on update is that when the cache was split into multiple tables (http://drupal.org/node/72290) it didn't include the new cache tables in update.php's cache clearing. This patch moves all the cache clearing to the original location.

I also think it makes more sense for cache_clear_all() to default to clearing all cache tables, and not just cache_page. This can be addressed with the cache clearing hook.

ChrisKennedy’s picture

The old issue for tweaking the cache api is at http://drupal.org/node/81461

drumm’s picture

Status: Needs review » Fixed

Committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)