Skip to content

Commit

Permalink
Merge pull request #178 from Automattic/do_not_cache_put_delete
Browse files Browse the repository at this point in the history
Don't cache PUT and DELETE requests
  • Loading branch information
donnchawp committed Feb 3, 2017
2 parents 0a7bab6 + 0488c72 commit 4b908f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wp-cache-phase1.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

do_cacheaction( 'cache_init' );

if ( ! $cache_enabled || $_SERVER["REQUEST_METHOD"] == 'POST' || isset( $_GET['customize_changeset_uuid'] ) ) {
if ( ! $cache_enabled || in_array( $_SERVER["REQUEST_METHOD"], array( 'POST', 'PUT', 'DELETE' ) ) || isset( $_GET['customize_changeset_uuid'] ) ) {
return true;
}

Expand Down

0 comments on commit 4b908f2

Please sign in to comment.