WordPress.org

Ready to get started?Download WordPress

Forums

Memcached Object Cache
NULL table_prefix causes varying prefixes in single site (3 posts)

  1. Jeremy Felt
    Member
    Posted 1 year ago #

    Not really support, but there's no great place to submit pull requests, so...

    Setup:

    • Using trunk of object-cache.php
    • WordPress 3.5.1 (single site)
    • Batcache plugin
    • Single or multiple memcached servers
    • Single or multiple web servers

    Problem:
    Page requests while logged in use a different cache key than those that are generated by batcache. This causes two versions of the data to be stored in memcached. A logged in user will regenerate it fine for other logged in users, but the batcache version will hang until dropped out of memcached naturally.

    Solution
    The introduction of the switch_to_blog() method caused some kind of issue here. Not bringing the $table_prefix global in when generating the blog_prefix causes the blog_prefix to be : instead of $table_prefix:. The only fix necessary that I can see so far is to add a line to bring in the global. My forked version of Memcached Object Cache has this: https://github.com/jeremyfelt/Memcached-Object-Cache/commit/116ab778cc61786c56d775ab4e2a257c8b42097c

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

  2. Weston Ruter
    Member
    Posted 1 year ago #

    +1 on the patch

  3. phikai
    Member
    Posted 8 months ago #

    I'll admit that my technical understanding of this isn't clear... but it does seem to eliminate that Notice.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.