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

Nor4a’s picture

What 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.

JGO’s picture

nope that is not the problem I'm suffering from. It just doesn't seem to clear the cache of everything properly :s

R.Muilwijk’s picture

Status: Active » Postponed (maintainer needs more info)

Can you give me more information about your setup?

Darren Oh’s picture

Issue summary: View changes

More 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.

Darren Oh’s picture

Status: Postponed (maintainer needs more info) » Active
davidsickmiller’s picture

Hi,

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:

  • 24bbb37e84889f8d3fffb11f34caabcc::cache_menu::local_tasks:admin/structure/menu/manage/%
  • 24bbb37e84889f8d3fffb11f34caabcc::cache_menu::links:devel:tree-data:en:35786c7117b4e38d0f169239752ce71158266ae2f6e4aa230fbbb87bd699c0e3
  • 24bbb37e84889f8d3fffb11f34caabcc::cache_menu::links:navigation:tree-data:en:7495eb1e79a64d19a9c75b78fd39b8b17c02b3073c84e89a5069ca6b9c76749c
  • 24bbb37e84889f8d3fffb11f34caabcc::cache_menu::links:shortcut-set-1:page:admin/structure/menu/manage/main-menu:en:1:0
  • 24bbb37e84889f8d3fffb11f34caabcc::cache_menu::menu_custom
  • 24bbb37e84889f8d3fffb11f34caabcc::cache_menu::links:management:tree-data:en:af7e60543764d80f0bcd19bb13274c387aab0ad78a28b02ca81377e98f51e995
  • 24bbb37e84889f8d3fffb11f34caabcc::cache_menu::links:user-menu:page:admin/structure/menu/manage/main-menu:en:1:1
  • 24bbb37e84889f8d3fffb11f34caabcc::cache_menu::links:management:tree-data:en:ec99d3452fef1ede622e66c68ba908b1dad455aa71f5e68648aeec6488b89c88
  • 24bbb37e84889f8d3fffb11f34caabcc::cache_menu::links:management:page:admin/structure/menu/manage/main-menu:en:1:0:trail
  • 24bbb37e84889f8d3fffb11f34caabcc::cache_menu::links:main-menu:page:admin/structure/menu/manage/main-menu:en:1:1
  • 24bbb37e84889f8d3fffb11f34caabcc::cache_menu::links:shortcut-set-1:tree-data:en:9bd1605e2280833450478f9083b7f8714c2fa28f1012455e2744e5af1a13eec5
  • 24bbb37e84889f8d3fffb11f34caabcc::cache_menu::links:management:all:0:en:0

However, running apc_cache_info("user") immediately afterwards shows that these cache entries weren't returned by APCIterator, and thus weren't deleted:

  • 24bbb37e84889f8d3fffb11f34caabcc::cache_menu::local_tasks:node/%
  • 24bbb37e84889f8d3fffb11f34caabcc::cache_menu::links:user-menu:page:node/3:en:1:1
  • 24bbb37e84889f8d3fffb11f34caabcc::cache_menu::links:user-menu:tree-data:en:9ec01ec58bf82a695e4acd636af283e0585fe8cd8a6e54eb140188a3e284ab1c
  • 24bbb37e84889f8d3fffb11f34caabcc::cache_menu::links:main-menu:page:node/3:en:1:1
  • 24bbb37e84889f8d3fffb11f34caabcc::cache_menu::links:main-menu:tree-data:en:3edd5c33ea832bafb14626eb63fc7e44bdff0d646551b32ee86c58e883212e77
  • 24bbb37e84889f8d3fffb11f34caabcc::cache_menu::links:main-menu:all:0:en:0
  • 24bbb37e84889f8d3fffb11f34caabcc::cache_menu::links:main-menu:tree-data:en:ec99d3452fef1ede622e66c68ba908b1dad455aa71f5e68648aeec6488b89c88

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.

davidsickmiller’s picture

Upgrading to apcu 4.0.11 did not fix my problem.

I've discovered two bugs in APCIterator:

  1. The iterator erroneously excludes results that are older than apc.ttl (the "soft" TTL that controls what happens when APC runs out of space)
  2. getTotalCount() erroneously includes cache entries that are older than their individual TTLs

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