這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Memcached Object Cache

外掛說明

Memcached Object Cache provides a persistent backend for the WordPress object cache. A memcached server and the PECL memcache extension are required.

安裝方式

  1. Install memcached on at least one server. Note the connection info. The default is 127.0.0.1:11211.

  2. Install the PECL memcache extension

  3. Copy object-cache.php to wp-content

常見問題集

How can I manually specify the memcached server(s)?

Add something similar to the following to wp-config.php above /* That's all, stop editing! Happy blogging. */:

$memcached_servers = array(     'default' => array(         '10.10.10.20:11211',         '10.10.10.30:11211'     ) ); 

The top level array keys, are cache groups, where ‘default’ corresponds to any cache group that is not explicitly defined. This allows for specifying memcached servers that only handle certain cache groups. The most common use is only specifying ‘default’.

Possible cache groups are:

{$taxonomy}_relationships {$meta_type}_meta {$taxonomy}_relationships blog-details blog-id-cache blog-lookup bookmark calendar category comment counts general global-posts options plugins post_ancestors post_meta posts rss site-lookup site-options site-transient terms themes timeinfo transient user_meta useremail userlogins usermeta users userslugs widget 

使用者評論

Apparently Perfect functioning, Out-Of-The-Box.

For my purposes, that assume a default configuration (of ‘memcached’), this little plugin just works. And it seems to cache a wide variety of objects by design.

It’s important to follow the instructions carefully though, as this is a drop-in, the installation of which is not that, of a standard plugin.

Dirk

Works perfectly!

Hi!

It works out-of-box, just added the file and done! Awesome work here!

Only had to replace the constructor name at 424 to -> function __construct() – so we avoid a Warning at PHP7, for example.

Kind Regards,
Rafael

Nothing but Fatal

Getting consistent fatal errors upon activation of plugin

Fatal error: Cannot redeclare wp_cache_add() (previously declared in /home/urbschool/public_html/wp-includes/cache.php:27) in /home/urbschool/public_html/wp-content/plugins/memcached/object-cache.php on line 22

閱讀全部 15 則使用者評論

貢獻者及開發者

Memcached Object Cache 外掛為開源軟體。以下人員為這個外掛做出了重大貢獻。

將 Memcached Object Cache 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

3.0.1

  • Fix key generation error in switch_to_blog()

3.0.0

  • Flush site cache by rotating keys
  • Flush global cache when flushing main site

2.0.6

  • Flush the local cache on wp_cache_flush()

2.0.5

  • Fix missing global in switch_to_blog

2.0.4

  • Remove deprecated constructor

2.0.3

  • Support for unix sockets

2.0.2

  • Break references by cloning objects
  • Keep local cache in sync with memcached when using incr and decr
  • Handle limited environments where is_multisite() is not defined
  • Fix setting and getting 0
  • PHP 5.2.4 is now required
  • Use the WP_CACHE_KEY_SALT constant if available to gaurantee uniqueness of keys