Plugin Directory

Changeset 2981297

Timestamp:
10/19/2023 04:31:26 PM (11 months ago)
Author:
Ipstenu
Message:

REL 5.2.0 - likely final

Location:
varnish-http-purge
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • varnish-http-purge/tags/5.2.0/changelog.txt

    r2708849 r2981297  
    11## CHANGELOG
     2
     3
     4
     5
     6
     7
     8
     9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
    223
    324= 5.0.3 =
  • varnish-http-purge/tags/5.2.0/debug.php

    r2708849 r2981297  
    267267
    268268            // Optional Headers.
    269             $x_via     = ( is_numeric( strpos( $headers['Via'], 'arnish' ) ) ) ? true : false;
     269            $x_via = false;
     270            if ( is_array( $headers['Via'] ) ) {
     271                foreach ( $headers['Via'] as $header_via ) {
     272                    if ( is_numeric( strpos( $header_via, 'arnish' ) ) ) {
     273                        $x_via = true;
     274                        break;
     275                    }
     276                }
     277            }
    270278            $x_cache   = ( isset( $headers['x-cache-status'] ) && strpos( $headers['x-cache-status'], 'HIT' ) !== false ) ? true : false;
    271279            $x_p_cache = ( isset( $headers['X-Proxy-Cache'] ) && strpos( $headers['X-Proxy-Cache'], 'HIT' ) !== false ) ? true : false;
     
    309317        } else {
    310318            // translators: %1 is the type of caching service detected (i.e. nginx or varnish).
    311             $return['message'] = sprintf( __( 'We detected that the %1s caching service is running, but we are unable to determine that it\'s working.', 'varnish-http-purge' ), $cache_service );
     319            $return['message'] = sprintf( __( 'We detected that the %1s caching service is running, but we are unable to determine that it\'s working.', 'varnish-http-purge' ), $cache_service );
    312320            $return['icon']    = 'warning';
    313321        }
  • varnish-http-purge/tags/5.2.0/readme.txt

    r2944403 r2981297  
    44Requires at least: 5.0
    55Tested up to: 6.3
    6 Stable tag: 5.1.3
     6Stable tag: 5.
    77Requires PHP: 5.6
    88
     
    1010
    1111== Description ==
     12
     13
     14
     15
    1216
    1317<strong>This plugin <em>does not</em> install nor configure a cache proxy. It acts as an interface with such services.</strong>
     
    108112I worked at DreamHost from 2012 to 2022, and have maintained the plugin since around 2014 or so.
    109113
    110 This plugin is installed by default for _all_ DreamPress installs on DreamHost, and I still maintain it, but it was not originally an official DreamHost plugin which means I will continue to support all users to the best of my ability.
     114.
    111115
    112116= Is this plugin caching my data? =
     
    247251Yes _IF_ the service has an interface. Sadly Nginx does not. [Detailed directions can be found on the debugging section on GitHub](https://github.com/Ipstenu/varnish-http-purge/wiki). Bear in mind, these interfaces tend to be command-line only.
    248252
     253
     254
     255
     256
    249257== Changelog ==
    250258
    251 = 5.1.3 =
    252 * June 2022
    253 * Check if a required option exists before trying to use it
    254 
    255 = 5.1.2 =
    256 * April 2022
    257 * Fix typo in readme
    258 
    259 = 5.1.1 =
    260 * April 2022
    261 * Prevent two versions of the plugin from running at once.
    262 * Correct JSON
    263 
    264 = 5.1 =
    265 * February 2022
    266 * WP 5.9 Compat
    267 * Rate limiting to prevent abuse - if you try to purge more than the max number of posts in a go (default 50), a purge ALL is triggered
    268 * Allows customizing the purge URL to support: (credit mickaelperrin)
    269 - Nginx cache purge mechanism that doesn't support regex directives
    270 - Custom purge location
     259= 5.2.0 =
     260* July 2023
     261* Fix debug for if Via headers are an array (props @iverok)
    271262
    272263== Screenshots ==
  • varnish-http-purge/tags/5.2.0/varnish-http-purge.php

    r2740153 r2981297  
    44 * Plugin URI: https://github.com/ipstenu/varnish-http-purge/
    55 * Description: Automatically empty cached pages when content on your site is modified.
    6  * Version: 5.1.3
     6 * Version: 5.
    77 * Author: Mika Epstein
    88 * Author URI: https://halfelf.org/
     
    1313 * @package varnish-http-purge
    1414 *
    15  * Copyright 2016-2022 Mika Epstein (email: ipstenu@halfelf.org)
     15 * Copyright 2016-202 Mika Epstein (email: ipstenu@halfelf.org)
    1616 *
    17  * This file is part of Proxy Cache Purge (formerly Varnish HTTP Purge), a 
     17 * This file is part of Proxy Cache Purge (formerly Varnish HTTP Purge), a
    1818 * plugin for WordPress.
    1919 *
     
    3737     * @var string
    3838     */
    39     public static $version = '5.0.3';
     39    public static $version = '5.';
    4040
    4141    /**
     
    411411            }
    412412
    413             // If we're on a front end page and the current user can edit published posts, then they can do this.
    414             if ( ! is_admin() && get_post() !== false && current_user_can( 'edit_published_posts' ) ) {
    415                 $page_url = esc_url( home_url( $wp->request ) );
    416                 $args[]   = array(
    417                     'parent' => 'purge-varnish-cache',
    418                     'id'     => 'purge-varnish-cache-this',
    419                     'title'  => __( 'Purge Cache (This Page)', 'varnish-http-purge' ),
    420                     'href'   => wp_nonce_url( add_query_arg( 'vhp_flush_do', $page_url . '/' ), 'vhp-flush-do' ),
    421                     'meta'   => array(
    422                         'title' => __( 'Purge Cache (This Page)', 'varnish-http-purge' ),
    423                     ),
    424                 );
    425             }
    426 
    427413            // If Devmode is in the config, don't allow it to be disabled.
    428414            if ( ! VHP_DEVMODE ) {
     
    432418                    $vhp_add_query_arg   = array(
    433419                        'vhp_flush_do'    => 'devmode',
    434                         'vhp_set_devmode' => 'dectivate',
     420                        'vhp_set_devmode' => 'dectivate',
    435421                    );
    436422                } else {
     
    452438                );
    453439            }
     440
     441
     442
     443
     444
     445
     446
     447
     448
     449
     450
     451
     452
     453
    454454        }
    455455
     
    605605                $max_posts = VHP_VARNISH_MAXPOSTS;
    606606            } else {
    607                 $max_posts = get_option( 'vhp_varnish_max_posts_before_all' );
     607                $max_posts = get_option( 'vhp_varnish_max_posts_before_all' );
    608608            }
    609609
  • varnish-http-purge/trunk/changelog.txt

    r2708849 r2981297  
    11## CHANGELOG
     2
     3
     4
     5
     6
     7
     8
     9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
    223
    324= 5.0.3 =
  • varnish-http-purge/trunk/debug.php

    r2708849 r2981297  
    267267
    268268            // Optional Headers.
    269             $x_via     = ( is_numeric( strpos( $headers['Via'], 'arnish' ) ) ) ? true : false;
     269            $x_via = false;
     270            if ( is_array( $headers['Via'] ) ) {
     271                foreach ( $headers['Via'] as $header_via ) {
     272                    if ( is_numeric( strpos( $header_via, 'arnish' ) ) ) {
     273                        $x_via = true;
     274                        break;
     275                    }
     276                }
     277            }
    270278            $x_cache   = ( isset( $headers['x-cache-status'] ) && strpos( $headers['x-cache-status'], 'HIT' ) !== false ) ? true : false;
    271279            $x_p_cache = ( isset( $headers['X-Proxy-Cache'] ) && strpos( $headers['X-Proxy-Cache'], 'HIT' ) !== false ) ? true : false;
     
    309317        } else {
    310318            // translators: %1 is the type of caching service detected (i.e. nginx or varnish).
    311             $return['message'] = sprintf( __( 'We detected that the %1s caching service is running, but we are unable to determine that it\'s working.', 'varnish-http-purge' ), $cache_service );
     319            $return['message'] = sprintf( __( 'We detected that the %1s caching service is running, but we are unable to determine that it\'s working.', 'varnish-http-purge' ), $cache_service );
    312320            $return['icon']    = 'warning';
    313321        }
  • varnish-http-purge/trunk/readme.txt

    r2944403 r2981297  
    44Requires at least: 5.0
    55Tested up to: 6.3
    6 Stable tag: 5.1.3
     6Stable tag: 5.
    77Requires PHP: 5.6
    88
     
    1010
    1111== Description ==
     12
     13
     14
     15
    1216
    1317<strong>This plugin <em>does not</em> install nor configure a cache proxy. It acts as an interface with such services.</strong>
     
    108112I worked at DreamHost from 2012 to 2022, and have maintained the plugin since around 2014 or so.
    109113
    110 This plugin is installed by default for _all_ DreamPress installs on DreamHost, and I still maintain it, but it was not originally an official DreamHost plugin which means I will continue to support all users to the best of my ability.
     114.
    111115
    112116= Is this plugin caching my data? =
     
    247251Yes _IF_ the service has an interface. Sadly Nginx does not. [Detailed directions can be found on the debugging section on GitHub](https://github.com/Ipstenu/varnish-http-purge/wiki). Bear in mind, these interfaces tend to be command-line only.
    248252
     253
     254
     255
     256
    249257== Changelog ==
    250258
    251 = 5.1.3 =
    252 * June 2022
    253 * Check if a required option exists before trying to use it
    254 
    255 = 5.1.2 =
    256 * April 2022
    257 * Fix typo in readme
    258 
    259 = 5.1.1 =
    260 * April 2022
    261 * Prevent two versions of the plugin from running at once.
    262 * Correct JSON
    263 
    264 = 5.1 =
    265 * February 2022
    266 * WP 5.9 Compat
    267 * Rate limiting to prevent abuse - if you try to purge more than the max number of posts in a go (default 50), a purge ALL is triggered
    268 * Allows customizing the purge URL to support: (credit mickaelperrin)
    269 - Nginx cache purge mechanism that doesn't support regex directives
    270 - Custom purge location
     259= 5.2.0 =
     260* July 2023
     261* Fix debug for if Via headers are an array (props @iverok)
    271262
    272263== Screenshots ==
  • varnish-http-purge/trunk/varnish-http-purge.php

    r2740153 r2981297  
    44 * Plugin URI: https://github.com/ipstenu/varnish-http-purge/
    55 * Description: Automatically empty cached pages when content on your site is modified.
    6  * Version: 5.1.3
     6 * Version: 5.
    77 * Author: Mika Epstein
    88 * Author URI: https://halfelf.org/
     
    1313 * @package varnish-http-purge
    1414 *
    15  * Copyright 2016-2022 Mika Epstein (email: ipstenu@halfelf.org)
     15 * Copyright 2016-202 Mika Epstein (email: ipstenu@halfelf.org)
    1616 *
    17  * This file is part of Proxy Cache Purge (formerly Varnish HTTP Purge), a 
     17 * This file is part of Proxy Cache Purge (formerly Varnish HTTP Purge), a
    1818 * plugin for WordPress.
    1919 *
     
    3737     * @var string
    3838     */
    39     public static $version = '5.0.3';
     39    public static $version = '5.';
    4040
    4141    /**
     
    411411            }
    412412
    413             // If we're on a front end page and the current user can edit published posts, then they can do this.
    414             if ( ! is_admin() && get_post() !== false && current_user_can( 'edit_published_posts' ) ) {
    415                 $page_url = esc_url( home_url( $wp->request ) );
    416                 $args[]   = array(
    417                     'parent' => 'purge-varnish-cache',
    418                     'id'     => 'purge-varnish-cache-this',
    419                     'title'  => __( 'Purge Cache (This Page)', 'varnish-http-purge' ),
    420                     'href'   => wp_nonce_url( add_query_arg( 'vhp_flush_do', $page_url . '/' ), 'vhp-flush-do' ),
    421                     'meta'   => array(
    422                         'title' => __( 'Purge Cache (This Page)', 'varnish-http-purge' ),
    423                     ),
    424                 );
    425             }
    426 
    427413            // If Devmode is in the config, don't allow it to be disabled.
    428414            if ( ! VHP_DEVMODE ) {
     
    432418                    $vhp_add_query_arg   = array(
    433419                        'vhp_flush_do'    => 'devmode',
    434                         'vhp_set_devmode' => 'dectivate',
     420                        'vhp_set_devmode' => 'dectivate',
    435421                    );
    436422                } else {
     
    452438                );
    453439            }
     440
     441
     442
     443
     444
     445
     446
     447
     448
     449
     450
     451
     452
     453
    454454        }
    455455
     
    605605                $max_posts = VHP_VARNISH_MAXPOSTS;
    606606            } else {
    607                 $max_posts = get_option( 'vhp_varnish_max_posts_before_all' );
     607                $max_posts = get_option( 'vhp_varnish_max_posts_before_all' );
    608608            }
    609609
Note: See TracChangeset for help on using the changeset viewer.