This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

EM Object Cache

Description

The plugin implements object level persistent caching and can be used instead of the built in WordPress WP_Object_Cache.
Unlike WP Super Cache, Hyper Cache and other plugins, EM Object Cache does not cache the entire page; instead, it caches the data WordPress explicitly asks it to cache (using wp_cache_xxx() API functions).
Although this means that the performance will be less than with, say, WP Super Cache, all your pages remain dynamic.

EM Object Cache won’t help you much if the plugins or theme you are using do not use WordPress Cache API.
This is by design, since the plugin tries to play nice. However, for most WordPress installations this will not be critical.

EM Object Cache significantly reduces the load from your database. Say, my blog’s home page without the plugin
executes 24 queries (0.02403 sec); with the plugin enabled, only 4 queries (0.00188 sec).
Unlike DB Cache/DB Cache Reloaded, the plugin will work in the Admin Panel and supports all plugins that use WordPress Cache API.

This plugin is the successor of WP File Cache and SJ Object Cache and is based on their codebases.

CAVEATS:
* if you want to use FileCache caching engine, chances are that the plugin will not work when PHP safe mode is enabled and web server is operated by a different user than owns the files.

Deactivation/Removal

  1. Please make sure that wp-content directory is writable by the web server: the plugin will need to delete object-cache.php from it.
  2. Deactivate/uninstall the plugin in the ‘Plugins’ menu in WordPress.
  3. Please verify that wp-content/object-cache.php file was removed.

FAQ

The plugin does not work with Custom Field Template plugin.

This is because Custom Field Template maintains its own cache for the post meta data which gets out of sync with WordPress cache. Please add cft_post_meta to the list of the non-persistent groups (EM Object Cache > Generic Options)

After activation of FileCache engine, I see an error: “Warning: file_exists(): open_basedir restriction in effect. File(`filename`) is not within the allowed path(s)”. What to do?

A1: Try to get rid of open_basedir form your php.ini/Apache config. open_basedir is considered a “broken” security measure anyway and only slows down file operations.

A2: If disabling open_basedir is not an option, set the Cache location under the EM Object Cache > FileCache to the directory that satisfies the open_basedir restriction.

Reviews

works good

Maik Penz

Improving many blogs for years.

With recent APCu-deployments compatibility breaks on default settings this engine and requires apcu-bc additions. But as the engine is optional this is no serious concern.

incredibble speed!

Den999

O, yeah!
incredible speed up!

1. Original without plugin: 0,395 sec
2. With plugin: 5,458 sec

Read all 6 reviews

Changelog

EMOC 2.1 (Jul 08, 2013)

  • Changed all paths from em_object_cache to em-object-cache due to WP requirements (“an underscore character is not valid in a path, therefore you can’t have em_object_cache as the plugin’s slug. Only alphanumeric characters and the dash are valid.”).

EMOC 2.0 (Jun 08, 2013)

  • First public release of EM Object Cache
  • Work around a weird bug when $_wp_using_ext_object_cache somehow resets to true (0a41da8)
  • Major refactoring of SJOC codebase
  • igbinary support (bbf61ad)
  • Compatibility with WP 3.6
  • Added guards to fix path disclosure vulnerability (d595b19)

WPFC 1.2.9.1 (Dec 16, 2010)

  • Fixed stupid bug

WPFC 1.2.9 (Dec 15, 2010)

  • Ability to disable caching when memory is low

SJOC 1.3 (Oct 31, 2010)

  • Bug fix with Memcached engine registration
  • Removed FileGroupCache
  • Get rid of maybe_serialize()
  • Optimizations

SJOC 1.2 (Oct 14, 2010)

  • Added Memcache/Memcached support

WPFC 1.2.8.2 (Apr 8, 2010)

  • Suppress ‘stat failed’ warning for filemtime

WPFC 1.2.8.1 (Apr 7, 2010)

  • Save options bug fix

WPFC 1.2.8 (Mar 27, 2010)

  • Added Ukrainian translation (props Andrey K.)
  • Fixed typos in readme.txt

WPFC 1.2.7 (Mar 12, 2010)

  • Option to always use fresh data in the Admin Panel
  • Added Belarussian translation (props Antsar)

SJOC 1.1 (Mar 25, 2010)

  • Experimental WPMU support

SJOC 1.0 (Mar 8, 2010)

  • Declared RC3 stable

WPFC 1.2.6 (Mar 6, 2010)

  • Updated FAQ
  • Added an experimental option to partially disable the cache in the Admin panel

WPFC 1.2.5 (Feb 15, 2010)

  • Data to be cached are not passed by reference anymore to ensure there are no side effects
  • Objects are cloned before caching to avoid any side effects

WPFC 1.2.4 (Feb 14, 2010)

  • Fixed wrong directory name

WPFC 1.2.3 (Feb 12, 2010)

  • readme.txt bug fix

WPFC 1.2.2 (Feb 12, 2010)

  • Compatibility with WP 3.0

WPFC 1.2.1 (Jan 14, 2010)

  • optimized the code, speeded up FileCache class methods by moving all sanity checks to wp_cache_xxx() functions
  • file lock on write
  • less system calls are used
  • compatibility with WordPress 2.6
  • plugin won’t cause WSoD if the plugin is deleted but wp-content/object-cache.php file is not

SJOC 1.0rc3 (Jan 4, 2010)

  • $__sjfc_options is forcefully global variable
  • admin_menu and admin_init hooks are set up only when is_admin() is true
  • unset all internally used variables in object-cache.php
  • added wp_cache_reset() support
  • cache is not persistent when $_SERVER['HTTP_HOST'] is not set (CLI mode)
  • moved sanity checks from BaseCache to wp_cache_add_global_groups() and wp_cache_add_non_persistent_groups()
  • removed eAcceleratorGroupCache and xGroupCache
  • FileCache: use LOCK_EX with file_get_contents()
  • Minor PHP code optimizations
  • &$this => $this

SJOC 1.0rc2 (Jan 3, 2010)

  • Renamed SjObjectCache to SJ Object Cache
  • load_plugin_textdomain() is called only if is_admin() is true (translations are not used in user mode)

SJOC 1.0rc1 (Dec 20, 2009)

  • Added eAcceleratorGroupCache
  • Moved several checks from BaseCache to wp_cache_XXX() functions to speed up internally used functions
  • Minor PHP code optimizations
  • Better wp_cache_flush() implementation for APC, eAccelerator and XCache

WPFC 1.1 (Dec 19, 2009)

  • Fixed serious floating bug in FileCache::get()

SJOC 0.01 (Sep 22, 2009)

  • The first version of SJ Object Cache (proof of concept). Supported engines: APC, XCache, eAccelerator, FileCache, FileGroupCache, Zend Disk Cache, Zend Shared Memory Cache, XGroupCache

WPFC 1.0 (Dec 2, 2008)

  • Really do not remember

WPFC 0.2.1 (Jun 12, 2008)

  • First public release

Contributors & Developers

This is open source software. The following people have contributed to this plugin.

Contributors

Browse the code