File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 */
1010define ('CACHE_EVERYTHING_JS_URL ' , 'wp-content/plugins/cache-everything/js ' );
1111define ('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
1414require_once (plugin_dir_path (__FILE__ ) . 'handle-js-request.php ' );
1515require_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
You can’t perform that action at this time.
0 commit comments