Skip to content

Commit

Permalink
Clear cache when updating General, Discussion, or Permalink settings
Browse files Browse the repository at this point in the history
See #223
  • Loading branch information
raamdev committed Sep 25, 2014
1 parent 1b3088a commit 0f431b9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions quick-cache/quick-cache.inc.php
Expand Up @@ -2008,9 +2008,21 @@ public function maybe_auto_clear_cache()
return; // Already did this.
$this->cache[__FUNCTION__][$_pagenow] = -1;

// If Dashboard → Settings → General options are updated
if($GLOBALS['pagenow'] === 'options-general.php' && !empty($_REQUEST['settings-updated']))
$this->auto_clear_cache();

// If Dashboard → Settings → Reading options are updated
if($GLOBALS['pagenow'] === 'options-reading.php' && !empty($_REQUEST['settings-updated']))
$this->auto_clear_cache();

// If Dashboard → Settings → Discussion options are updated
if($GLOBALS['pagenow'] === 'options-discussion.php' && !empty($_REQUEST['settings-updated']))
$this->auto_clear_cache();

// If Dashboard → Settings → Permalink options are updated
if($GLOBALS['pagenow'] === 'options-permalink.php' && !empty($_REQUEST['settings-updated']))
$this->auto_clear_cache();
}

/**
Expand Down

0 comments on commit 0f431b9

Please sign in to comment.