From 00c914cfb5707cdffa8e71eca31beb5c77494836 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 27 Mar 2017 13:24:09 -0400 Subject: [PATCH] *Remove use of user id in cache tree --- includes/class-rocket-async-css.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/includes/class-rocket-async-css.php b/includes/class-rocket-async-css.php index 5a5f866..795304f 100644 --- a/includes/class-rocket-async-css.php +++ b/includes/class-rocket-async-css.php @@ -386,15 +386,8 @@ public function process_css_buffer( $buffer ) { } $post_cache_id [] = $post_cache_id_hash; if ( is_user_logged_in() ) { - $post_cache_id [] = wp_get_current_user()->roles[0]; - $post_cache_role_id = $post_cache_id; - $post_cache_role = $this->get_cache_fragment( $post_cache_id ); - if ( ! empty( $post_cache_role ) ) { - $post_cache = $post_cache_role; - } else { - $post_cache_id [] = get_current_user_id(); - $post_cache = $this->get_cache_fragment( $post_cache_id ); - } + $post_cache_id [] = wp_get_current_user()->roles[0]; + $post_cache = $this->get_cache_fragment( $post_cache_id ); } if ( ! empty( $post_cache ) ) { // Cached file is gone, we dont have cache @@ -547,9 +540,6 @@ public function process_css_buffer( $buffer ) { if ( ! empty( $css ) ) { rocket_put_content( $filename, $css ); $href = get_rocket_cdn_url( set_url_scheme( str_replace( ABSPATH, trailingslashit( $home ), $filename ) ) ); - if ( empty( $post_cache_role ) ) { - $this->update_cache_fragment( $post_cache_role_id, compact( 'filename', 'href' ) ); - } $this->update_cache_fragment( $post_cache_id, compact( 'filename', 'href' ) ); } } else {