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.
I use the empty cache button. The nodes are refreshed, but for example changes to blocks not. Example: Block was disabled, but is still showing up. Restarting the complete apache (and thus apc) resolves the problem.
Comments
Comment #1
Nor4a CreditAttribution: Nor4a commentedWhat I have noticed, is that if you are using multiple domains for one site - you need to login and clear the cache for each of the domains.
Is there some way to clear the apc cache for all the domains with one click?
For some of the sites I have 6 and more domains - it becomes quite time consuming just to clear all caches.
Comment #2
JGO CreditAttribution: JGO commentednope that is not the problem I'm suffering from. It just doesn't seem to clear the cache of everything properly :s
Comment #3
R.Muilwijk CreditAttribution: R.Muilwijk commentedCan you give me more information about your setup?
Comment #4
Darren OhMore information has been provided in duplicate issue #2416081: Is system cache flushing supposed to also clear the APC user cache?. I had the same issue trying to clear all caches with drush or with the flush all caches link from the Administration Menu module.
Comment #5
Darren OhComment #6
davidsickmiller CreditAttribution: davidsickmiller commentedHi,
I created #2416081: Is system cache flushing supposed to also clear the APC user cache?, which was closed as a duplicate of this issue. I'm not sure if it is, but it might be.
Here's what was (and still is) happening for me:
1. I modify the website's main menu
2. I view the website but still see the old cached version of the menu.
3. I select "Flush all caches" from the admin home menu.
4. I reload the website but still see the old cached version of the menu.
5. I click the "clear apc user cache" button under Performance > Development > Performance.
6. I reload the website and finally see the new version of the menu.
I've dug deeper, and the problem seems to be in APCIterator. deletePrefix() is instantiating it with the regex "/^24bbb37e84889f8d3fffb11f34caabcc\:\:cache_menu\:\:/", and it's successfully matching and deleting these cache entries:
However, running apc_cache_info("user") immediately afterwards shows that these cache entries weren't returned by APCIterator, and thus weren't deleted:
I keep seeing the old version of my main menu because that "links:main-menu:all:0:en:0" entry isn't getting deleted.
I'm using the latest version of the apc module, v3.1.13.
Hopefully switching to apcu will fix this.
Incidentally, I'm using patch #7 from #2183285: Use \Q...\E for regex literals., without which I think the cache entries with slashes in the names would have problems. My prefixes are also different than normal due to patch #2 from #2898530: HTTP_HOST is not a reliable default prefix.
Comment #7
davidsickmiller CreditAttribution: davidsickmiller commentedUpgrading to apcu 4.0.11 did not fix my problem.
I've discovered two bugs in APCIterator:
The first bug is why deletePrefix() failed to delete some of my cache entries.
I've submitted a pull request to fix both bugs in the apcu package: https://github.com/krakjoe/apcu/pull/253