Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions includes/Fastcgi_Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
public function __construct() {
add_action( 'save_post', [ $this, 'on_save_post' ], 10, 2 );
add_action( 'delete_post', [ $this, 'wp_trash_post' ], 10, 2 );
// add_action( 'edited_term', [ $this, 'purge_taxonomy_cache' ], 10, 2 );

Check warning on line 26 in includes/Fastcgi_Cache.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

This comment is 58% valid code; is this commented out code?
// add_action( 'wp_update_nav_menu', [ $this, 'purge_home_cache' ], 10, 2 );
}

Expand Down Expand Up @@ -61,7 +61,7 @@
'enabled' => true,
'home_created' => true,
'home_deleted' => true,
// 'single_modified' => true,

Check warning on line 64 in includes/Fastcgi_Cache.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

This comment is 58% valid code; is this commented out code?
// 'single_comment' => true,
];

Expand Down Expand Up @@ -121,6 +121,11 @@
$parsed = wp_parse_url( $url );
$path = isset( $parsed['path'] ) ? $parsed['path'] : '';

// Ensure path ends with trailing slash
if ( substr( $path, -1 ) !== '/' ) {
$path .= '/';
}

// cache key format (without space): $protocal $method $host $path
// because of nginx-proxy, all request will be http, so we don't need to check protocal
// $method is always GET as we only cache GET request
Expand Down