SQLite difference with Opcache | WordPress.org

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.


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer