Plugin Directory

Changeset 3002326


Ignore:
Timestamp:
11/27/2023 07:32:17 PM (2 years ago)
Author:
getpantheon
Message:

Update to version 1.4.4 from GitHub

Location:
wp-redis
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wp-redis/tags/1.4.4/cli.php

    r2930999 r3002326  
    8181            WP_CLI::error( 'Unknown wp-content/object-cache.php already exists.' );
    8282        }
    83         $object_cache = dirname( __FILE__ ) . '/object-cache.php';
     83        $object_cache = __DIR__ . '/object-cache.php';
    8484        $target       = self::get_relative_path( $drop_in, $object_cache );
    8585        chdir( WP_CONTENT_DIR );
     
    185185        add_filter(
    186186            'template_include',
    187             function( $template ) {
     187            function ( $template ) {
    188188                $display_template = str_replace( dirname( get_template_directory() ) . '/', '', $template );
    189189                WP_CLI::debug( "Theme template: {$display_template}", 'redis-debug' );
     
    241241        return implode( '/', $rel_path );
    242242    }
    243 
    244243}
    245244
  • wp-redis/tags/1.4.4/object-cache.php

    r2930999 r3002326  
    760760        }
    761761
     762        // Get unique keys.
     763        $keys = array_unique( $keys );
     764
    762765        $cache = [];
    763766        if ( ! $this->_should_persist( $group ) ) {
     
    774777                if ( $this->_isset_internal( $key, $group ) ) {
    775778                    $cache[ $key ] = $this->_get_internal( $key, $group );
    776                     $this->cache_hits++;
     779                    ++$this->cache_hits;
    777780                }
    778781            }
     
    801804                $value = is_numeric( $value ) ? intval( $value ) : unserialize( $value );
    802805                $this->_set_internal( $key, $group, $value );
    803                 $this->cache_hits++;
     806                ++$this->cache_hits;
    804807            } else {
    805                 $this->cache_misses++;
     808                ++$this->cache_misses;
    806809            }
    807810            $cache[ $key ] = $value;
     
    13301333                // PhpRedis throws an Exception when it fails a server call.
    13311334                // 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
    13331336            }
    13341337        }
     
    13591362                    $this->redis_calls[ $method ] = 0;
    13601363                }
    1361                 $this->redis_calls[ $method ]++;
     1364                ++$this->redis_calls[ $method ];
    13621365                $retval = call_user_func_array( [ $this->redis, $method ], $arguments );
    13631366                return $retval;
     
    14251428                return false;
    14261429        }
    1427 
    14281430    }
    14291431
     
    15581560     */
    15591561    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  
    33Tags: cache, plugin, redis
    44Requires at least: 3.0.1
    5 Tested up to: 6.2
    6 Stable tag: 1.4.3
     5Tested up to: 6.4.1
     6Stable tag: 1.4.4
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    101101There'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.
    102102
     103= Where do I report security bugs found in this plugin? =
     104Please 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
    103106== 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)
    104111
    105112= 1.4.3 (June 26, 2023)  =
  • wp-redis/tags/1.4.4/wp-redis.php

    r2930999 r3002326  
    44 * Plugin URI: http://github.com/pantheon-systems/wp-redis/
    55 * Description: WordPress Object Cache using Redis. Requires the PhpRedis extension (https://github.com/phpredis/phpredis).
    6  * Version: 1.4.3
     6 * Version: 1.4.4
    77 * Author: Pantheon, Josh Koenig, Matthew Boynes, Daniel Bachhuber, Alley Interactive
    88 * Author URI: https://pantheon.io/
     
    2626
    2727if ( defined( 'WP_CLI' ) && WP_CLI && ! class_exists( 'WP_Redis_CLI_Command' ) ) {
    28     require_once dirname( __FILE__ ) . '/cli.php';
     28    require_once __DIR__ . '/cli.php';
    2929}
    3030
  • wp-redis/trunk/cli.php

    r2930999 r3002326  
    8181            WP_CLI::error( 'Unknown wp-content/object-cache.php already exists.' );
    8282        }
    83         $object_cache = dirname( __FILE__ ) . '/object-cache.php';
     83        $object_cache = __DIR__ . '/object-cache.php';
    8484        $target       = self::get_relative_path( $drop_in, $object_cache );
    8585        chdir( WP_CONTENT_DIR );
     
    185185        add_filter(
    186186            'template_include',
    187             function( $template ) {
     187            function ( $template ) {
    188188                $display_template = str_replace( dirname( get_template_directory() ) . '/', '', $template );
    189189                WP_CLI::debug( "Theme template: {$display_template}", 'redis-debug' );
     
    241241        return implode( '/', $rel_path );
    242242    }
    243 
    244243}
    245244
  • wp-redis/trunk/object-cache.php

    r2930999 r3002326  
    760760        }
    761761
     762        // Get unique keys.
     763        $keys = array_unique( $keys );
     764
    762765        $cache = [];
    763766        if ( ! $this->_should_persist( $group ) ) {
     
    774777                if ( $this->_isset_internal( $key, $group ) ) {
    775778                    $cache[ $key ] = $this->_get_internal( $key, $group );
    776                     $this->cache_hits++;
     779                    ++$this->cache_hits;
    777780                }
    778781            }
     
    801804                $value = is_numeric( $value ) ? intval( $value ) : unserialize( $value );
    802805                $this->_set_internal( $key, $group, $value );
    803                 $this->cache_hits++;
     806                ++$this->cache_hits;
    804807            } else {
    805                 $this->cache_misses++;
     808                ++$this->cache_misses;
    806809            }
    807810            $cache[ $key ] = $value;
     
    13301333                // PhpRedis throws an Exception when it fails a server call.
    13311334                // 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
    13331336            }
    13341337        }
     
    13591362                    $this->redis_calls[ $method ] = 0;
    13601363                }
    1361                 $this->redis_calls[ $method ]++;
     1364                ++$this->redis_calls[ $method ];
    13621365                $retval = call_user_func_array( [ $this->redis, $method ], $arguments );
    13631366                return $retval;
     
    14251428                return false;
    14261429        }
    1427 
    14281430    }
    14291431
     
    15581560     */
    15591561    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  
    33Tags: cache, plugin, redis
    44Requires at least: 3.0.1
    5 Tested up to: 6.2
    6 Stable tag: 1.4.3
     5Tested up to: 6.4.1
     6Stable tag: 1.4.4
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    101101There'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.
    102102
     103= Where do I report security bugs found in this plugin? =
     104Please 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
    103106== 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)
    104111
    105112= 1.4.3 (June 26, 2023)  =
  • wp-redis/trunk/wp-redis.php

    r2930999 r3002326  
    44 * Plugin URI: http://github.com/pantheon-systems/wp-redis/
    55 * Description: WordPress Object Cache using Redis. Requires the PhpRedis extension (https://github.com/phpredis/phpredis).
    6  * Version: 1.4.3
     6 * Version: 1.4.4
    77 * Author: Pantheon, Josh Koenig, Matthew Boynes, Daniel Bachhuber, Alley Interactive
    88 * Author URI: https://pantheon.io/
     
    2626
    2727if ( defined( 'WP_CLI' ) && WP_CLI && ! class_exists( 'WP_Redis_CLI_Command' ) ) {
    28     require_once dirname( __FILE__ ) . '/cli.php';
     28    require_once __DIR__ . '/cli.php';
    2929}
    3030
Note: See TracChangeset for help on using the changeset viewer.