Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Clear cache on logout
function wp_rocket_clear_user_cache_logout() {
$user = wp_get_current_user();
rocket_clean_user( $user->ID );
}
add_action( 'clear_auth_cookie', 'wp_rocket_clear_user_cache_logout' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment