Skip to content

Commit

Permalink
Flip cache checking to avoid cache sharing across store views
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier Villanueva committed Sep 30, 2021
1 parent 55ac326 commit c14b92e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Block/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ public function getCacheKeyInfo(): array
{
$info = parent::getCacheKeyInfo();

if (!empty($this->getSlug())) {
$info[] = "storyblok_slug_{$this->getSlug()}";
} elseif (!empty($this->getData('story')['id'])) {
if (!empty($this->getData('story')['id'])) {
$info[] = "storyblok_{$this->getData('story')['id']}";
} elseif (!empty($this->getSlug())) {
$info[] = "storyblok_slug_{$this->getSlug()}";
}

return $info;
Expand Down

0 comments on commit c14b92e

Please sign in to comment.