Skip to content

Commit

Permalink
Merge pull request #1287 from helsingborg-stad/fix/remove-sticky-opti…
Browse files Browse the repository at this point in the history
…on-static-cache

fix: remove sticky option static cache
  • Loading branch information
NiclasNorin authored Jan 24, 2025
2 parents aebf21c + 421e856 commit 6ffa6e7
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions library/StickyPost/Helper/GetStickyOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
*/
class GetStickyOption
{
private static array $optionsCache = [];

/**
* Constructor for the GetStickyOption class.
*
Expand Down Expand Up @@ -47,10 +45,6 @@ public function getOption(string $suffix): array
{
$key = $this->getOptionKey($suffix);

if (isset(self::$optionsCache[$key])) {
return self::$optionsCache[$key];
}

$option = $this->wpService->getOption(
$this->getOptionKey($suffix),
[]
Expand All @@ -60,8 +54,6 @@ public function getOption(string $suffix): array
$option = [];
}

self::$optionsCache[$key] = $option;

return $option;
}
}

0 comments on commit 6ffa6e7

Please sign in to comment.