Skip to content

Instantly share code, notes, and snippets.

@init90
Last active May 4, 2018 19:47
Show Gist options
  • Save init90/aa5a5082815a645dce699eac0efc31a2 to your computer and use it in GitHub Desktop.
Save init90/aa5a5082815a645dce699eac0efc31a2 to your computer and use it in GitHub Desktop.
Drupal 8, reset cache in \Drupal::state()
$this->state->resetCache();
$this->state->set("current_community_{$this->current_user->id()}", $community_id);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment