{"id":233,"date":"2009-03-12T14:08:09","date_gmt":"2009-03-12T14:08:09","guid":{"rendered":"https:\/\/www.mohanjith.net\/blog\/?p=233"},"modified":"2009-07-17T02:24:33","modified_gmt":"2009-07-17T02:24:33","slug":"wordpress-object-cache-with-memcached-backend-for-vanilla-wordpress","status":"publish","type":"post","link":"https:\/\/mohanjith.net\/blog\/2009\/03\/wordpress-object-cache-with-memcached-backend-for-vanilla-wordpress.html","title":{"rendered":"WordPress object cache with memcached backend for vanilla WordPress"},"content":{"rendered":"<p>WordPress object cache with memcached backend is mainly meant for WPMU and doesn&#8217;t work well if you happened to have many vanilla WordPress installations using the same memcached backend like it is pointed out <a href=\"https:\/\/www.mohanjith.net\/blog\/2008\/10\/using-memcached-with-wordpress-object-cache.html\">here<\/a> and <a href=\"http:\/\/wordpress.org\/support\/topic\/241314?replies=1\" target=\"_blank\">here<\/a>.<\/p>\n<p>I have created a <a href=\"https:\/\/www.mohanjith.net\/blog\/wp-content\/uploads\/2009\/03\/object-cachephp.patch\" target=\"_blank\">simple patch<\/a> which you can apply against <a href=\"http:\/\/plugins.trac.wordpress.org\/export\/71058\/memcached\/trunk\/object-cache.php\" target=\"_blank\">object-cache.php<\/a> (downloadable from WordPress plugin repository) or <a href=\"https:\/\/www.mohanjith.net\/blog\/wp-content\/uploads\/2009\/03\/object-cachephp.txt\" target=\"_blank\">here is the file already patched<\/a>. The patch prepends the <code>$blog_id<\/code> to the object key. You will have to specify global variable <code>$blog_id<\/code> in <code>wp-config.php<\/code> and give it a unique id (like your blog url).<br \/>\n[sourcecode language=&#8217;php&#8217;]global $blog_id;<br \/>\n$blog_id = &#8216;mohanjith_net&#8217;;[\/sourcecode]<\/p>\n<div id=\"fb-like\" style=\"\"><iframe src=\"http:\/\/www.facebook.com\/plugins\/like.php?href=https:\/\/mohanjith.net\/blog\/2009\/03\/wordpress-object-cache-with-memcached-backend-for-vanilla-wordpress.html&amp;layout=standard&amp;show_faces=true&amp;width=300&amp;action=like&amp;font=&amp;colorscheme=light&amp;locale=en_US\" scrolling=\"no\" frameborder=\"0\" allowTransparency=\"true\" style=\"border:none; overflow:hidden; width:300px; height:30px\"><\/iframe><\/div>","protected":false},"excerpt":{"rendered":"<p>WordPress object cache with memcached backend is mainly meant for WPMU and doesn&#8217;t work well if you happened to have many vanilla WordPress installations using the same memcached backend like it is pointed out here and here. I have created a simple patch which you can apply against object-cache.php (downloadable from WordPress plugin repository) or &#8230; <a title=\"WordPress object cache with memcached backend for vanilla WordPress\" class=\"read-more\" href=\"https:\/\/mohanjith.net\/blog\/2009\/03\/wordpress-object-cache-with-memcached-backend-for-vanilla-wordpress.html\" aria-label=\"More on WordPress object cache with memcached backend for vanilla WordPress\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[130,147,126],"tags":[442,454,438],"class_list":["post-233","post","type-post","status-publish","format-standard","hentry","category-memcached","category-patch","category-wordpress","tag-memcached","tag-patch","tag-wordpress"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5lUHm-3L","jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/posts\/233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/comments?post=233"}],"version-history":[{"count":5,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/posts\/233\/revisions"}],"predecessor-version":[{"id":238,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/posts\/233\/revisions\/238"}],"wp:attachment":[{"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/media?parent=233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/categories?post=233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohanjith.net\/blog\/wp-json\/wp\/v2\/tags?post=233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}