Skip to content

Commit 37ac4c7

Browse files
hotfix
1 parent 6930755 commit 37ac4c7

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

cache-everything.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
* Plugin Name: Cache Everything
44
* Plugin URI: https://github.com/AsyncAlchemist
55
* Description: A simple plugin to cache everything in Wordpress.
6-
* Version: 0.26
6+
* Version: 0.27
77
* Author: Taylor Selden
88
* Author URI: https://github.com/AsyncAlchemist
99
*/
1010
define('CACHE_EVERYTHING_JS_URL', 'wp-content/plugins/cache-everything/js');
1111
define('CACHE_EVERYTHING_CSS_URL', 'wp-content/plugins/cache-everything/css');
12-
define('CACHE_EVERYTHING_VERSION', '0.26');
12+
define('CACHE_EVERYTHING_VERSION', '0.27');
1313

1414
require_once(plugin_dir_path(__FILE__) . 'handle-js-request.php');
1515
require_once(plugin_dir_path(__FILE__) . 'handle-css-request.php');
@@ -132,6 +132,16 @@ function cache_everything_modify_headers() {
132132
return;
133133
}
134134

135+
// Check if the response code is not 200, then return early to avoid caching
136+
if (http_response_code() != 200) {
137+
return;
138+
}
139+
140+
// Check if the URL contains the word "streamer", then return early to avoid caching
141+
if (strpos($_SERVER['REQUEST_URI'], 'streamer') !== false) {
142+
return;
143+
}
144+
135145
// Retrieve the options with a default to an empty array if not set
136146
$options = get_option('cache_everything_cache_options', []);
137147

0 commit comments

Comments
 (0)