You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix apc_cache_default_expunge() to always remove expired entries
When apc_cache_default_expunge() is called, it now always cleans up
expired entries and doesn't skip cleanup anymore, as it is only called
when there is not enough memory available to store a cache entry and
cleanup is really needed. The skip can happen because the function
apc_sma_get_avail_mem() doesn't take into account that a block of
contiguous memory is needed. In situations with huge fragmentation,
the old behavior can cause apcu to not accept new entries anymore which
don't fit into a fragment of available memory. This causes php-functions
like apcu_store() to not being able to insert bigger entries, until the
cache has filled up enough with small entries to trigger the cleanup.
This commit fixes the issue and mostly implements a behavior that should
have already been implemented previously according to the header file.
This also applies to the smart configuration setting that is now used to
tune the probability of a full cache wipe.
0 commit comments