XF 2.0 apcu entries


Active member
The apcu cache seems to be filling up with entries that are never used or updated/removed


Is this normal behaviour? The amount of entries just keeps increasing until the cache is full and then the whole cache is flushed. Towards the end, the regularly used entries are no longer able to cache as all the zero hit entries take all the space.


Well-known member
This is expected with how the css cache works, With XF1 you are looking ~80 css cache entries per theme or so. XF2 isn't going to be any better.

I can't recommend APCu due it known deadlock issues* and how poorly it scales with large number of entries**, and finally the lack of expiry handling means when the cache is full it flushes everything.

*If a php process dies (say due to slow query killer) inside APCu's lock every other process will then wait forever for a lock which can't be released.
** APCu does a linear scan through every item on every APCu api call, which takes longer the more keys you have which makes the above deadlock easier to trigger