이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

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

  4. Add the WP_CACHE_KEY_SALT constant to the wp-config.php:

    php
    define( 'WP_CACHE_KEY_SALT', '...long random string...' );

This helps prevent cache pollution when multiplte WordPress installs are using the same Memcached server. The value must be unique for each WordPress install.

FAQ

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

후기

2023년 10월 21일
Install is not like other plugins — and in fact if you do upload it to plugins and then activate it, it’ll bring your site down in many cases. You can upload it (but don’t activate!) and then use the server side to move the plugin file manually into wp-content (and then delete the uploaded plugin folder and readme.txt). But that’s not enough to make the whole thing work! You also need memcached running on your server and properly configured, and the pecl memcache extension compiled on the server side in your php configuration, too. Make sure to use a unique salt as well. Once it’s all there, the speed improvement is significant! Happy to try and help those that respond to this thread if you need — or at least try to get you pointed in the right direction. Thanks for the plugin, devs! Appreciate as you update and keep current as well!
2023년 7월 8일
@terrykernan I moved like you said but then i get ciritcal error and can enter the Admin section of wordpress, when i remove it from WP-Content everything works again. I installed the plugin only because i have Redis on my host
2023년 5월 17일 답글 1개
Tip for others here, if you are getting this error: “Cannot redeclare wp_cache_add” It probably means you have the object-cache.php file in the wrong directory, it should not be in the plugins/memcached/ folder, it should be moved to the wp-content folder!
2023년 4월 5일 답글 1개
Fatal error: Cannot redeclare wp_cache_add() (previously declared in /htdocs/wp-includes/cache.php:41) in /htdocs/wp-content/plugins/memcached/object-cache.php on line 19
2023년 2월 16일
It works well even with WPRocket Cache plugin. If you get fatal errors don’t forget to install PECL memcache module to PHP.
모든 30 평가 읽기

기여자 & 개발자

“Memcached Object Cache”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

“Memcached Object Cache”(이)가 6 개 언어로 번역되었습니다. 기여해 주셔서 번역자님께 감사드립니다.

자국어로 “Memcached Object Cache”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

4.0.0

  • Add preemptive filter pre_wp_cache_get
  • Add flush_number replication to prevent accidental flush due to flush_number eviction, server rotation, etc.

3.2.2

  • Remove filter, and base key stripping on presence of key_salt

3.2.1

  • Fix bug allowing slow-ops entries to have the same key, so toggling doesn’t work

3.2.0

  • Better stats(). Now shows cache group/individual calls with size of the payload and timings.
  • PHP 5.6.20 is now required
  • Fix get_multi to show per group calls
  • Added filter (memcached_strip_keys) to bypass memcached key stripping
  • Special group for slow-ops ( > 5ms ) with backtrace

3.1.0

  • Add wp_cache_get_multi
  • Add support for the $found parameter
  • Set a variable for $max_expiration to 30 days
  • Code style changes
  • Different coloring for unknown stats group
  • Store host/port on failure_callback
  • Default stats counts

3.0.2

  • Better output of HTML

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 guarantee uniqueness of keys