Automattic / Automattic/wp-memcached
[Feature request/question] How to disable for a single website in wpmu ?
- Dominant language
- PHP
- Stars
- 172
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
Thank you for this module, it rocks :)
Is it possible to disable the cache object on a specific website in a wordpress network ? Is there any constant and/or filter we could use ?
As I could not find it I added a filter in the object-cache.php but I'm not sure if it's required and/or in the right place :
```
function wp_cache_set( $key, $data, $group = '', $expire = 0 ) {
global $wp_object_cache;
if ( defined( 'WP_INSTALLING' ) == false && apply_filters( 'ircf_wp_cache_disabled', false ) == false) {
return $wp_object_cache->set( $key, $data, $group, $expire );
} else {
return $wp_object_cache->delete( $key, $group );
}
}
```
Thank you very much :)
Mathieu.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading object-cache.php and the wp_cache_set() entry point, including the proposed ircf_wp_cache_disabled filter. Review the five-comment thread for an agreed direction; the issue is complete only when a documented, supported way to disable caching for one WordPress network site is defined and verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- memcached, php, wordpress
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100