Closed szepeviktor closed 8 years ago
I presume by the title of the issue you feel like; why have I released this when a apcu object cache already exists? TL;DR the one linked isn't as good and this version is based off my apc plugin released over two years ago.
This APCu plugin is a direct copy of my APC plugin that has been updated to run in PHP7 where apc-bc isn't enabled. The original being released back in May 2014, way before the apcu plugin you linked was released.
My apc plugin was originally a fork of this apc plugin because the plugin listed there was broken and flawed. My original apc plugin has fixed those issues I had with the original and has had years of development done to it to improve it and add upon. My apcu version is just a copy with the function names updated to work with apcu.
Looking at the apcu plugin you have linked and going through the code I can see it suffers from some of the same problems I had with the original apc plugin and lacks some useful functionality that mine has.
For now I will continue to use my implementation.
Thank you for your explanation. Could you mention 1 thing that plugin suffers from?
Stores all things going in or out of APC in a local PHP variable, so in the event of running a PHP script that calls upon APC a lot, the memory usage of the PHP script could exhaust the memory allocated to it. Even if you are not calling on APC a lot it is still needlessly storing stuff in script memory.
Storing the values in a variable is not necessary when using APC/u as it is in memory store, which it is just as quick to call values from the store than from a variable. This storing in a local variable thing is only beneficial when dealing with object stores that have higher latency to fetch its contents such as going over the network stack to Redis or Memcache.
I see.
Do you know https://wordpress.org/plugins/apcu/?