Changeset 1435867
- Timestamp:
- 06/13/2016 02:09:16 PM (10 years ago)
- Location:
- memcached-redux/trunk
- Files:
-
- 2 edited
-
object-cache.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
memcached-redux/trunk/object-cache.php
r874836 r1435867 3 3 Plugin Name: Memcached Redux 4 4 Description: The real Memcached (not Memcache) backend for the WP Object Cache. 5 Version: 0.1. 35 Version: 0.1.4 6 6 Plugin URI: http://wordpress.org/extend/plugins/memcached/ 7 7 Author: Scott Taylor - uses code from Ryan Boren, Denis de Bernardy, Matt Martz, Mike Schroder … … 52 52 } 53 53 54 function wp_cache_get( $key, $group = '' ) {55 global $wp_object_cache; 56 57 return $wp_object_cache->get( $key, $group );54 function wp_cache_get( $key, $group = '', $force = false, &$found = null ) { 55 global $wp_object_cache; 56 57 return $wp_object_cache->get( $key, $group, $force, $found ); 58 58 } 59 59 … … 224 224 } 225 225 226 function get( $id, $group = 'default' ) { 227 $key = $this->key( $id, $group ); 228 $mc =& $this->get_mc( $group ); 229 230 if ( isset( $this->cache[$key] ) ) { 226 function get( $id, $group = 'default', $force = false, &$found = null ) { 227 $key = $this->key( $id, $group ); 228 $mc =& $this->get_mc( $group ); 229 $found = false; 230 231 if ( isset( $this->cache[$key] ) && ( !$force || in_array( $group, $this->no_mc_groups ) ) ) { 232 $found = true; 231 233 if ( is_object( $this->cache[$key] ) ) 232 234 $value = clone $this->cache[$key]; … … 237 239 } else { 238 240 $value = $mc->get( $key ); 239 if ( empty( $value ) || ( is_integer( $value ) && -1 == $value ) ) 241 if ( empty( $value ) || ( is_integer( $value ) && -1 == $value ) ){ 240 242 $value = false; 243 $found = $mc->getResultCode() !== Memcached::RES_NOTFOUND; 244 } else { 245 $found = true; 246 } 241 247 $this->cache[$key] = $value; 242 248 } -
memcached-redux/trunk/readme.txt
r874836 r1435867 3 3 Tags: cache, Memcached, admin, manage cache, object cache, WP Object Cache 4 4 Requires at least: 3.0 5 Tested up to: 3.8.16 Stable Tag: 0.1. 35 Tested up to: 4.1 6 Stable Tag: 0.1.4 7 7 8 8 Uses the Memcached class (not the Memcache class) to implement WP Object Cache … … 36 36 37 37 == Changelog == 38 = 0.1.4 = 39 * Implementing $force and &$found parameters to wp_cache_get. 38 40 39 41 = 0.1.3 =
Note: See TracChangeset
for help on using the changeset viewer.