-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes to "Reading Settings" do not clear the cache #223
Comments
@jaswsinc I'm not finding anything I can hook into for when the Reading Settings are updated. It looks like I'll need to hook into I'd prefer not to do it that way if at all possible, since any changes to option names (or the addition of new options to the Reading Settings page) would require updating the list of options in Quick Cache. Do you have any other ideas? |
Maybe something like this... <?php
add_action('admin_init', function(){
if($GLOBALS['pagenow'] === 'options-reading.php' && !empty($_POST['submit']))
// Clear the cache.
}); |
Actually, it might be better like this... <?php
add_action('admin_init', function(){
if($GLOBALS['pagenow'] === 'options-reading.php' && !empty($_REQUEST['settings-updated']))
// Clear the cache.
}); |
@jaswsinc That should work! Thank you. |
Next release changelog:
|
Note: I updated this to include clearing the cache when General, Discussion, or Permalink settings are updated, as all of those have settings which could affect the frontend of the site and therefore cause cache files to become outdated. |
Cool 👍 |
If changes are made to the WordPress "Reading Settings" (Dashboard → Settings → Reading Settings), the cache is not cleared. This results in a stale version of the site being served.
Steps to reproduce this bug:
Changes to "Reading Settings" should trigger a wipe of the entire cache, as those settings can affect many different views and therefore many different cache files.
The text was updated successfully, but these errors were encountered: