apcu_add always takes a wlock in the current version 5.1.22, which leads to lots of lock contention in high concurrency scenarios. Since the most common operation ought to be updating an already existing key, wrap apcu_add in an apcu_exists that only takes a rlock.
apcu_add always takes a wlock in the current version 5.1.22, which leads to lots of lock contention in high concurrency scenarios. Since the most common operation ought to be updating an already existing key, wrap apcu_add in an apcu_exists that only takes a rlock.