| @@ -120,13 +120,8 @@ | ||
| 120 | 120 | public function purge_cache_by_url( $url ) { |
| 121 | 121 | $parsed = wp_parse_url( $url ); |
| 122 | 122 | $path = isset( $parsed['path'] ) ? $parsed['path'] : ''; |
| 123 | 123 | |
| 124 | - // Ensure path ends with trailing slash | |
| 125 | - if ( substr( $path, -1 ) !== '/' ) { | |
| 126 | - $path .= '/'; | |
| 127 | - } | |
| 128 | - | |
| 129 | 124 | // cache key format (without space): $protocal $method $host $path |
| 130 | 125 | // because of nginx-proxy, all request will be http, so we don't need to check protocal |
| 131 | 126 | // $method is always GET as we only cache GET request |
| 132 | 127 | $hash = md5( 'httpGET' . $parsed['host'] . $path ); |