Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#27470 closed enhancement (invalid)

added a WP_Feed_Cache_Memcache client using memcache as backend

Reported by: wei-feng's profile Wei Feng Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.9
Component: Feeds Keywords:
Focuses: Cc:



(this has been posted to github as

Some background on this change. So we have a multiple server setup -- one backend server and couple of frontend servers all with wordpress installed. To make it secure, only backend server can write to wordpress database and all the frontend servers are read-only. And wp-admin etc has been removed from all the frontend servers.

This setup runs fine in most of the cases (wp-cron is an exception but we have disabled it), until we added the RSS widget to sidebar. It seems the widget keeps last access time in wp_options table but in our setup frontend server cannot write to database:

WordPress database error UPDATE command denied to user 'blogro'@'' for table 'wp_options' for query UPDATE `wp_options` SET `option_value` = ...

So I have modified the WP_Feed_Cache a little bit, when MEMCACHE_SERVER is defined, use WP_Feed_Cache_Memcache to cache the RSS last access time in memcache instead of DB.

Attachments (1)

27470.patch (2.9 KB) - added by Wei Feng 10 years ago.
patch for wp-includes/class-feed.php

Download all attachments as: .zip

Change History (2)

@Wei Feng
10 years ago

patch for wp-includes/class-feed.php

#1 @mikeschroder
10 years ago

  • Component changed from Widgets to Feeds
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Hi Wei!

Thanks for this report. We actually handle external object caching using an object caching API, through an object-cache.php drop-in.

Transients will automatically use this when the drop-in is available.

If you'd like an example drop-in, check out this one for Memcache:

Hopefully this helps!

Note: See TracTickets for help on using tickets.