Thanks for this question. I confess I had not studied Docket Cache until you mentioned it, so I am no expert on that plugin.
My plugin is mentioned in the WordPress documentation for a simple reason: I have been working with the WordPress Core Performance Group on database optimization, and we were asked to revise the documentation. Had we been aware of Docket Cache we would have mentioned it. I’ll probably put in a doc ticket to add it the documentation.
What’s the difference between the two? Mine uses SQLite to hold the cached items, and Docket Cache puts each cached item into its own .php file. That means my plugin uses three files (.sqlite, .sqlite-shm, .sqlite-wal) on the filesystem, where Docket Cache necessarily uses thousands of files. On shared hosting, thousands of files can cause problems. (I developed mine because some clients were struggling with performance on GoDaddy-hosted sites.)
Mine uses php’s igbinary extension to serialize cache items for storage, and Docket Cache translates them to php code to store them. Upon loading cache items, Docket Cache can take advantage of php’s opcode cache; the cached items are simply php programs; if they are already loaded into the opcode cache reloading them is cheap.
Mine uses a least-recently-updated algorithm to evict cache entries when the cache grows too large. I believe Docket Cache uses a least-recently-USED algorithm. That algorithm is theoretically superior to mine, but adds cache-writing overhead whenever a cache item is read. I wanted reads to be as fast as possible.
If you are happy with the performance and stability of Docket Cache I see no reason to switch to my plugin.
I hope this helps.
Thread Starter
ms100
(@ms100)
Thank you @olliejones for the reply.
Our hosting provider does not seem to have an issue (at this moment in time) with the number of files. But I am happy to know another great Object Cache plugin is available.
I have added the SQLite Object Cache plugin to my favourites and I will definately follow the future developpement of the plugin. Have a great day 🙂