Skip to content

Commit

Permalink
Move check to the beginning of the function
Browse files Browse the repository at this point in the history
  • Loading branch information
arunshenoy99 committed Mar 19, 2024
1 parent b1e7bdb commit 9cc21e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions endurance-page-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -756,14 +756,14 @@ public function purge_cdn_single( $pattern = '' ) {
*/
public function should_throttle( $uri, $type ) {

$should_throttle = false;

$this->should_update_throttled_items = true;

if ( is_null( $uri ) ) {
return true;
}

$should_throttle = false;

$this->should_update_throttled_items = true;

$hash = md5( $uri );

if ( isset( $this->throttled[ $type ], $this->throttled[ $type ][ $hash ] ) ) {
Expand Down

0 comments on commit 9cc21e2

Please sign in to comment.