Skip to content

Commit

Permalink
Fix #233 - Add the explanation cache entry only, if there is no valid…
Browse files Browse the repository at this point in the history
… one with the same URI
  • Loading branch information
lochmueller committed Feb 27, 2020
1 parent 1eb20aa commit fe6e2af
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Classes/Cache/StaticFileBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ public function set($entryIdentifier, $data, array $tags = [], $lifetime = null)
];
if (\in_array('explanation', $tags, true)) {
$databaseData['explanation'] = $data->getHeader('X-SFC-Explanation');
parent::set($entryIdentifier, \serialize($databaseData), $tags, $realLifetime);
if (!parent::has($entryIdentifier)) {
// Add only the details if there is no valid cache entry
parent::set($entryIdentifier, \serialize($databaseData), $tags, $realLifetime);
}
return;
}

Expand Down

0 comments on commit fe6e2af

Please sign in to comment.