Filter before cache
-
Hi @keycdn,
it would be great if you could add a filter into yourset_cache
method:public static function set_cache($data) { // check if empty if ( empty($data) ) { return ''; } $data = apply_filters('cache_enabled_before_minify', $data); // store as asset call_user_func( array( self::$disk, 'store_asset' ), self::_minify_cache($data) ); return $data; }
It would allow plugin developers to modify the response before it is cached. Autoptimize contains the same filter with the name
autoptimize_filter_html_before_minify
.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Filter before cache’ is closed to new replies.