WordPress.org

Ready to get started?Download WordPress

Forums

XCache Object Cache Backend
[resolved] Xcache 1.3 (4 posts)

  1. Peter Chester
    Modern Tribe
    Posted 2 years ago #

    Apparently this plugin doesn't work on Xcache versions prior to 1.3 because of a dependency on the function xcache_unset_by_prefix().

    Unfortunately Dreamhost offers 1.2.2 to all its users. That's a lot of people.

    Ideally we'd want to replace that function with something that does the same thing but in the mean time, perhaps the plugin can automatically detect if the environment supports that and could notify the user that they need Xcache1.3

    I've updated the plugin with this fix and am attaching a diff for this.

    https://gist.github.com/2816431

    http://wordpress.org/extend/plugins/xcache/

  2. Peter Chester
    Modern Tribe
    Posted 2 years ago #

    Another thing that might work:

    // xcache 1.2 backwards compatibility
    if ( !function_exists( 'xcache_unset_by_prefix' ) ) {
    	function xcache_unset_by_prefix( $prefix ) {
    		// Since we can't clear targetted cache, we'll clear all. :(
    		xcache_clear_cache(XC_TYPE_VAR, 0);
    	}
    }
  3. Pierre
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks for the hint. I have added a workaround in version 1.0.3.

    Instead of checking if xcache_unset_by_prefix exists on every request I only do so in the flush() function as it is only used there. On a stock WP install flush() is only used by the upgrade script.

  4. Modern Tribe, Inc.
    Member
    Posted 2 years ago #

    Awesome! Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic