Changeset 3002326
- Timestamp:
- 11/27/2023 07:32:17 PM (2 years ago)
- Location:
- wp-redis
- Files:
-
- 8 edited
- 1 copied
-
tags/1.4.4 (copied) (copied from wp-redis/trunk)
-
tags/1.4.4/cli.php (modified) (3 diffs)
-
tags/1.4.4/object-cache.php (modified) (7 diffs)
-
tags/1.4.4/readme.txt (modified) (2 diffs)
-
tags/1.4.4/wp-redis.php (modified) (2 diffs)
-
trunk/cli.php (modified) (3 diffs)
-
trunk/object-cache.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/wp-redis.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-redis/tags/1.4.4/cli.php
r2930999 r3002326 81 81 WP_CLI::error( 'Unknown wp-content/object-cache.php already exists.' ); 82 82 } 83 $object_cache = dirname( __FILE__ ). '/object-cache.php';83 $object_cache = __DIR__ . '/object-cache.php'; 84 84 $target = self::get_relative_path( $drop_in, $object_cache ); 85 85 chdir( WP_CONTENT_DIR ); … … 185 185 add_filter( 186 186 'template_include', 187 function ( $template ) {187 function ( $template ) { 188 188 $display_template = str_replace( dirname( get_template_directory() ) . '/', '', $template ); 189 189 WP_CLI::debug( "Theme template: {$display_template}", 'redis-debug' ); … … 241 241 return implode( '/', $rel_path ); 242 242 } 243 244 243 } 245 244 -
wp-redis/tags/1.4.4/object-cache.php
r2930999 r3002326 760 760 } 761 761 762 // Get unique keys. 763 $keys = array_unique( $keys ); 764 762 765 $cache = []; 763 766 if ( ! $this->_should_persist( $group ) ) { … … 774 777 if ( $this->_isset_internal( $key, $group ) ) { 775 778 $cache[ $key ] = $this->_get_internal( $key, $group ); 776 $this->cache_hits++;779 ++$this->cache_hits; 777 780 } 778 781 } … … 801 804 $value = is_numeric( $value ) ? intval( $value ) : unserialize( $value ); 802 805 $this->_set_internal( $key, $group, $value ); 803 $this->cache_hits++;806 ++$this->cache_hits; 804 807 } else { 805 $this->cache_misses++;808 ++$this->cache_misses; 806 809 } 807 810 $cache[ $key ] = $value; … … 1330 1333 // PhpRedis throws an Exception when it fails a server call. 1331 1334 // To prevent WordPress from fataling, we catch the Exception. 1332 throw new Exception( $e->getMessage(), $e->getCode(), $e ); 1335 throw new Exception( $e->getMessage(), $e->getCode(), $e ); // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped 1333 1336 } 1334 1337 } … … 1359 1362 $this->redis_calls[ $method ] = 0; 1360 1363 } 1361 $this->redis_calls[ $method ]++;1364 ++$this->redis_calls[ $method ]; 1362 1365 $retval = call_user_func_array( [ $this->redis, $method ], $arguments ); 1363 1366 return $retval; … … 1425 1428 return false; 1426 1429 } 1427 1428 1430 } 1429 1431 … … 1558 1560 */ 1559 1561 public function __destruct() { 1560 return true; 1561 } 1562 } 1562 return true; // phpcs:ignore Universal.CodeAnalysis.ConstructorDestructorReturn.ReturnValueFound 1563 } 1564 } -
wp-redis/tags/1.4.4/readme.txt
r2930999 r3002326 3 3 Tags: cache, plugin, redis 4 4 Requires at least: 3.0.1 5 Tested up to: 6. 26 Stable tag: 1.4. 35 Tested up to: 6.4.1 6 Stable tag: 1.4.4 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 101 101 There's a known issue with WordPress `alloptions` cache design. Specifically, a race condition between two requests can cause the object cache to have stale values. If you think you might be impacted by this, [review this GitHub issue](https://github.com/pantheon-systems/wp-redis/issues/221) for links to more context, including a workaround. 102 102 103 = Where do I report security bugs found in this plugin? = 104 Please report security bugs found in the source code of the WP Redis plugin through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/wp-redis). The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin. 105 103 106 == Changelog == 107 108 = 1.4.4 (November 27, 2023) = 109 * Updates Pantheon WP Coding Standards to 2.0 [[#445](https://github.com/pantheon-systems/wp-redis/pull/445)] 110 * Handle duplicate keys in `get_multiple` function [[#448](https://github.com/pantheon-systems/wp-redis/pull/448)] (props @souptik) 104 111 105 112 = 1.4.3 (June 26, 2023) = -
wp-redis/tags/1.4.4/wp-redis.php
r2930999 r3002326 4 4 * Plugin URI: http://github.com/pantheon-systems/wp-redis/ 5 5 * Description: WordPress Object Cache using Redis. Requires the PhpRedis extension (https://github.com/phpredis/phpredis). 6 * Version: 1.4. 36 * Version: 1.4.4 7 7 * Author: Pantheon, Josh Koenig, Matthew Boynes, Daniel Bachhuber, Alley Interactive 8 8 * Author URI: https://pantheon.io/ … … 26 26 27 27 if ( defined( 'WP_CLI' ) && WP_CLI && ! class_exists( 'WP_Redis_CLI_Command' ) ) { 28 require_once dirname( __FILE__ ). '/cli.php';28 require_once __DIR__ . '/cli.php'; 29 29 } 30 30 -
wp-redis/trunk/cli.php
r2930999 r3002326 81 81 WP_CLI::error( 'Unknown wp-content/object-cache.php already exists.' ); 82 82 } 83 $object_cache = dirname( __FILE__ ). '/object-cache.php';83 $object_cache = __DIR__ . '/object-cache.php'; 84 84 $target = self::get_relative_path( $drop_in, $object_cache ); 85 85 chdir( WP_CONTENT_DIR ); … … 185 185 add_filter( 186 186 'template_include', 187 function ( $template ) {187 function ( $template ) { 188 188 $display_template = str_replace( dirname( get_template_directory() ) . '/', '', $template ); 189 189 WP_CLI::debug( "Theme template: {$display_template}", 'redis-debug' ); … … 241 241 return implode( '/', $rel_path ); 242 242 } 243 244 243 } 245 244 -
wp-redis/trunk/object-cache.php
r2930999 r3002326 760 760 } 761 761 762 // Get unique keys. 763 $keys = array_unique( $keys ); 764 762 765 $cache = []; 763 766 if ( ! $this->_should_persist( $group ) ) { … … 774 777 if ( $this->_isset_internal( $key, $group ) ) { 775 778 $cache[ $key ] = $this->_get_internal( $key, $group ); 776 $this->cache_hits++;779 ++$this->cache_hits; 777 780 } 778 781 } … … 801 804 $value = is_numeric( $value ) ? intval( $value ) : unserialize( $value ); 802 805 $this->_set_internal( $key, $group, $value ); 803 $this->cache_hits++;806 ++$this->cache_hits; 804 807 } else { 805 $this->cache_misses++;808 ++$this->cache_misses; 806 809 } 807 810 $cache[ $key ] = $value; … … 1330 1333 // PhpRedis throws an Exception when it fails a server call. 1331 1334 // To prevent WordPress from fataling, we catch the Exception. 1332 throw new Exception( $e->getMessage(), $e->getCode(), $e ); 1335 throw new Exception( $e->getMessage(), $e->getCode(), $e ); // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped 1333 1336 } 1334 1337 } … … 1359 1362 $this->redis_calls[ $method ] = 0; 1360 1363 } 1361 $this->redis_calls[ $method ]++;1364 ++$this->redis_calls[ $method ]; 1362 1365 $retval = call_user_func_array( [ $this->redis, $method ], $arguments ); 1363 1366 return $retval; … … 1425 1428 return false; 1426 1429 } 1427 1428 1430 } 1429 1431 … … 1558 1560 */ 1559 1561 public function __destruct() { 1560 return true; 1561 } 1562 } 1562 return true; // phpcs:ignore Universal.CodeAnalysis.ConstructorDestructorReturn.ReturnValueFound 1563 } 1564 } -
wp-redis/trunk/readme.txt
r2930999 r3002326 3 3 Tags: cache, plugin, redis 4 4 Requires at least: 3.0.1 5 Tested up to: 6. 26 Stable tag: 1.4. 35 Tested up to: 6.4.1 6 Stable tag: 1.4.4 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 101 101 There's a known issue with WordPress `alloptions` cache design. Specifically, a race condition between two requests can cause the object cache to have stale values. If you think you might be impacted by this, [review this GitHub issue](https://github.com/pantheon-systems/wp-redis/issues/221) for links to more context, including a workaround. 102 102 103 = Where do I report security bugs found in this plugin? = 104 Please report security bugs found in the source code of the WP Redis plugin through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/wp-redis). The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin. 105 103 106 == Changelog == 107 108 = 1.4.4 (November 27, 2023) = 109 * Updates Pantheon WP Coding Standards to 2.0 [[#445](https://github.com/pantheon-systems/wp-redis/pull/445)] 110 * Handle duplicate keys in `get_multiple` function [[#448](https://github.com/pantheon-systems/wp-redis/pull/448)] (props @souptik) 104 111 105 112 = 1.4.3 (June 26, 2023) = -
wp-redis/trunk/wp-redis.php
r2930999 r3002326 4 4 * Plugin URI: http://github.com/pantheon-systems/wp-redis/ 5 5 * Description: WordPress Object Cache using Redis. Requires the PhpRedis extension (https://github.com/phpredis/phpredis). 6 * Version: 1.4. 36 * Version: 1.4.4 7 7 * Author: Pantheon, Josh Koenig, Matthew Boynes, Daniel Bachhuber, Alley Interactive 8 8 * Author URI: https://pantheon.io/ … … 26 26 27 27 if ( defined( 'WP_CLI' ) && WP_CLI && ! class_exists( 'WP_Redis_CLI_Command' ) ) { 28 require_once dirname( __FILE__ ). '/cli.php';28 require_once __DIR__ . '/cli.php'; 29 29 } 30 30
Note: See TracChangeset
for help on using the changeset viewer.