Support » Plugin: Memcached Object Cache » NULL table_prefix causes varying prefixes in single site

  • Jeremy Felt

    (@jeremyfelt)


    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/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘NULL table_prefix causes varying prefixes in single site’ is closed to new replies.