pierres / wordpress-apcu

WordPress object-cache implementation using the APCu extension
https://wordpress.org/plugins/apcu/
4 stars 4 forks source link

Somehow apcu_add does not return false if key already exists #6

Open szepeviktor opened 7 years ago

szepeviktor commented 7 years ago

Moving comments to issues

Docs:

attempting to use apcu_add() to store data with a key that already exists will not overwrite the existing data, and will instead return FALSE

Workaround:

if (!isset($this->non_persistent_groups[$group]) && apcu_exists($key)) {