Skip to content

Commit

Permalink
Flush cache after setting or updating an option.
Browse files Browse the repository at this point in the history
  • Loading branch information
TorbenLundsgaard committed Sep 30, 2023
1 parent a957ecf commit 7dc7a19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ Enhancements:
* Optimize autoload of options for better performance.

Bugfixes:
* Flush cache after setting or updating an option.

Other:
* Require WordPress 6.2
Expand Down
1 change: 1 addition & 0 deletions src/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ public function set( array $options, bool $once = false, bool $overwrite_existin
}

// Now we need to re-cache values.
wp_cache_delete( self::OPTION_NAME, 'options' );
$this->options = get_option( self::OPTION_NAME, [] );
}

Expand Down

0 comments on commit 7dc7a19

Please sign in to comment.