Changeset 2981297
- Timestamp:
- 10/19/2023 04:31:26 PM (11 months ago)
- Location:
- varnish-http-purge
- Files:
-
- 8 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
varnish-http-purge/tags/5.2.0/changelog.txt
r2708849 r2981297 1 1 ## CHANGELOG 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 23 3 24 = 5.0.3 = -
varnish-http-purge/tags/5.2.0/debug.php
r2708849 r2981297 267 267 268 268 // 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 } 270 278 $x_cache = ( isset( $headers['x-cache-status'] ) && strpos( $headers['x-cache-status'], 'HIT' ) !== false ) ? true : false; 271 279 $x_p_cache = ( isset( $headers['X-Proxy-Cache'] ) && strpos( $headers['X-Proxy-Cache'], 'HIT' ) !== false ) ? true : false; … … 309 317 } else { 310 318 // 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 ); 312 320 $return['icon'] = 'warning'; 313 321 } -
varnish-http-purge/tags/5.2.0/readme.txt
r2944403 r2981297 4 4 Requires at least: 5.0 5 5 Tested up to: 6.3 6 Stable tag: 5. 1.36 Stable tag: 5. 7 7 Requires PHP: 5.6 8 8 … … 10 10 11 11 == Description == 12 13 14 15 12 16 13 17 <strong>This plugin <em>does not</em> install nor configure a cache proxy. It acts as an interface with such services.</strong> … … 108 112 I worked at DreamHost from 2012 to 2022, and have maintained the plugin since around 2014 or so. 109 113 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 . 111 115 112 116 = Is this plugin caching my data? = … … 247 251 Yes _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. 248 252 253 254 255 256 249 257 == Changelog == 250 258 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) 271 262 272 263 == Screenshots == -
varnish-http-purge/tags/5.2.0/varnish-http-purge.php
r2740153 r2981297 4 4 * Plugin URI: https://github.com/ipstenu/varnish-http-purge/ 5 5 * Description: Automatically empty cached pages when content on your site is modified. 6 * Version: 5. 1.36 * Version: 5. 7 7 * Author: Mika Epstein 8 8 * Author URI: https://halfelf.org/ … … 13 13 * @package varnish-http-purge 14 14 * 15 * Copyright 2016-202 2Mika Epstein (email: ipstenu@halfelf.org)15 * Copyright 2016-202 Mika Epstein (email: ipstenu@halfelf.org) 16 16 * 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 18 18 * plugin for WordPress. 19 19 * … … 37 37 * @var string 38 38 */ 39 public static $version = '5. 0.3';39 public static $version = '5.'; 40 40 41 41 /** … … 411 411 } 412 412 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 427 413 // If Devmode is in the config, don't allow it to be disabled. 428 414 if ( ! VHP_DEVMODE ) { … … 432 418 $vhp_add_query_arg = array( 433 419 'vhp_flush_do' => 'devmode', 434 'vhp_set_devmode' => 'de ctivate',420 'vhp_set_devmode' => 'dectivate', 435 421 ); 436 422 } else { … … 452 438 ); 453 439 } 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 454 } 455 455 … … 605 605 $max_posts = VHP_VARNISH_MAXPOSTS; 606 606 } else { 607 $max_posts = get_ option( 'vhp_varnish_max_posts_before_all' );607 $max_posts = get_option( 'vhp_varnish_max_posts_before_all' ); 608 608 } 609 609 -
varnish-http-purge/trunk/changelog.txt
r2708849 r2981297 1 1 ## CHANGELOG 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 23 3 24 = 5.0.3 = -
varnish-http-purge/trunk/debug.php
r2708849 r2981297 267 267 268 268 // 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 } 270 278 $x_cache = ( isset( $headers['x-cache-status'] ) && strpos( $headers['x-cache-status'], 'HIT' ) !== false ) ? true : false; 271 279 $x_p_cache = ( isset( $headers['X-Proxy-Cache'] ) && strpos( $headers['X-Proxy-Cache'], 'HIT' ) !== false ) ? true : false; … … 309 317 } else { 310 318 // 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 ); 312 320 $return['icon'] = 'warning'; 313 321 } -
varnish-http-purge/trunk/readme.txt
r2944403 r2981297 4 4 Requires at least: 5.0 5 5 Tested up to: 6.3 6 Stable tag: 5. 1.36 Stable tag: 5. 7 7 Requires PHP: 5.6 8 8 … … 10 10 11 11 == Description == 12 13 14 15 12 16 13 17 <strong>This plugin <em>does not</em> install nor configure a cache proxy. It acts as an interface with such services.</strong> … … 108 112 I worked at DreamHost from 2012 to 2022, and have maintained the plugin since around 2014 or so. 109 113 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 . 111 115 112 116 = Is this plugin caching my data? = … … 247 251 Yes _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. 248 252 253 254 255 256 249 257 == Changelog == 250 258 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) 271 262 272 263 == Screenshots == -
varnish-http-purge/trunk/varnish-http-purge.php
r2740153 r2981297 4 4 * Plugin URI: https://github.com/ipstenu/varnish-http-purge/ 5 5 * Description: Automatically empty cached pages when content on your site is modified. 6 * Version: 5. 1.36 * Version: 5. 7 7 * Author: Mika Epstein 8 8 * Author URI: https://halfelf.org/ … … 13 13 * @package varnish-http-purge 14 14 * 15 * Copyright 2016-202 2Mika Epstein (email: ipstenu@halfelf.org)15 * Copyright 2016-202 Mika Epstein (email: ipstenu@halfelf.org) 16 16 * 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 18 18 * plugin for WordPress. 19 19 * … … 37 37 * @var string 38 38 */ 39 public static $version = '5. 0.3';39 public static $version = '5.'; 40 40 41 41 /** … … 411 411 } 412 412 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 427 413 // If Devmode is in the config, don't allow it to be disabled. 428 414 if ( ! VHP_DEVMODE ) { … … 432 418 $vhp_add_query_arg = array( 433 419 'vhp_flush_do' => 'devmode', 434 'vhp_set_devmode' => 'de ctivate',420 'vhp_set_devmode' => 'dectivate', 435 421 ); 436 422 } else { … … 452 438 ); 453 439 } 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 454 } 455 455 … … 605 605 $max_posts = VHP_VARNISH_MAXPOSTS; 606 606 } else { 607 $max_posts = get_ option( 'vhp_varnish_max_posts_before_all' );607 $max_posts = get_option( 'vhp_varnish_max_posts_before_all' ); 608 608 } 609 609
Note: See TracChangeset
for help on using the changeset viewer.