Quantcast
Channel: wp-super-cache – WordPress.org Forums
Viewing all articles
Browse latest Browse all 3480

Draikin on "[Plugin: Autoptimize] Creating pre-gzipped cached files?"

$
0
0

Thanks for the help! I haven't done a lot of Wordpress development, so bear with me :) This seems to be working:

} else {
			// Write code to cache without doing anything else
			file_put_contents($this->cachedir.$this->filename,$code, LOCK_EX);
			if (apply_filters('autoptimize_cache_create_gzip',true)) {
				// Create an additional cached gzip file
				file_put_contents($this->cachedir.$this->filename.'.gzip',gzencode($code,9,FORCE_GZIP), LOCK_EX);
			}
		}

Is this what you had in mind when you said "behind a filter"? Contrary to what I posted above, I'm guessing you'd want this to be disabled by default? Or would this be worth adding an option in the Autoptimize menu for?


Viewing all articles
Browse latest Browse all 3480

Trending Articles