Object Cache 4 everyone
Object Cache 4 everyone
Description
Improve your server performance by using Memcached for object caching or by using disk support for object caching.
Fewer resources needed and better PageSpeed.
Fewer database queries needed.
Automatically detects any running Memcached server and adds an object-cache.php file to your WordPress site.
Default memcached servers tested:
– 127.0.0.1:11211
– 127.0.0.1:11212
– 127.0.0.1:11213
– 127.0.0.1:20000
– 127.0.0.1:20001
– Any SiteGround Memcached setup
Since 1.4, you can declare your own Memcached Server instance in the wp-config.php file.
Example:
define(‘OC4EVERYONE_MEMCACHED_SERVER’, ‘127.0.0.1:11211’);
Starting from version 1.6, you have the option to declare in the wp-config.php file whether you want to use the external disk object cache if the Memcached Server is not present.
Outdated or malfunctioning disks can negatively impact website performance.
Example:
define(‘OC4EVERYONE_DISABLE_DISK_CACHE’, true);
This plugin includes a modified template from this project:
https://github.com/humanmade/wordpress-pecl-memcached-object-cache
A WordPress object cache that uses the memcached (not memcache) PECL extension.
Thanks to Zack Tollman & 10up
Reviews
Works!
By smaggio (slier) on May 27, 2026
It works where other object cachers break the site in combination with other drop-ins, like Siteground Speed Optimizer memcached option.
Broke reCAPTCHA
By gdizzle510 on April 24, 2026
Broke reCAPTCHA for login. Would not use again.
Not everything is good...
By lemurnick on April 14, 2025
It litters the cache/object folder with hundreds of thousands of files. It does not clean outdated ones and the size of the folder and files grows exponentially.
Doesn't seem to work on multiple WP sites installed on same server
By sean10234 on April 12, 2025
When multiple WP installations are on the same server the "key" used appears to be generated by blog_id, which is the same across them all. On a multisite installation it may work, but not separate standalone sites. There should be a unique key generated based on the domain rather
Lots of potential
By WebDev1998 (keithvfs) on May 7, 2024
This plugin is sorely needed and has lots of potential. I like how it doesn't try to do more than it needs to regarding features. Unfortunately, updates do not come frequently enough to be in our main production sites. Somebody give this guy some resources!
Great Plugin
By carlmagnus on April 3, 2024
It just does what it says without any baggage. Thank you!
not serious
By Thomas (thomhsb) on March 26, 2024
The author is conspicuous by his lack of response
Partly good
By jensknolle on January 21, 2024
If the server does not have a memcache function, then the disk cache function is used, which fills up the server hard disk within a few days and thus drastically slows down the website. It seems that the function to delete disk cache files is missing.
Good plugin
By Lina (marmi2002) on December 29, 2023
Works very well, significantly improves the page rendering speed.
Lean and simple -- it just works
By verysiberian on October 17, 2023
This is a really good one. There are a surprisingly few number of plugins devoted solely to object caching, so I was pleased to find this little gem. Thanks to the developer for it, and please keep it updated and supported! It fills an important need. It is lean and simple to use without having a bewildering number of options that make things easy to break.
Changelog
2.3.3 – 2026-06-11
- Improved: The “Flush cache” action now requires an explicit administrator capability check (manage_options) in addition to the existing nonce.
- Improved: All Memcached statistics shown on the Plugins screen are escaped on output and item counters are cast to integers.
- Improved: The detected Memcached server address is now written to the generated object-cache.php drop-in with a safe encoder, and a server set via OC4EVERYONE_MEMCACHED_SERVER is validated against a strict host:port pattern.
- Improved: Disk object cache files are now protected from direct web access (deny-all rules and a non-PHP file extension) and verified with an HMAC integrity signature before being unserialized.
- Fix: Removed a debug log call that ran on every cache flush.
- Fix: Replaced the deprecated current_time(‘timestamp’) call used when stamping the generated drop-in.
- Fix: Corrected malformed HTML tags in the Plugins-screen statistics output.
2.3.2 – 2026-05-08
Template updated
2.3.1 – 2026-05-08
Security fixes. Plugin Check (PCP) review
2.3 – 2025-03-20
WPCS review
Added WordPress 6.9 compatibility
Happy birthday
For older changelog entries, please check the changelog.txt file