Skip to content

Commit

Permalink
Bugfix: Case-(In)sensitive cacheIdentifier
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikdro committed Jan 7, 2021
1 parent 7698c79 commit 9798c94
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Classes/Controller/JavaScriptController.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function renderJavaScriptAction()
//TODO: Add minifiy/uglify for JS here. I haven't found a good composer-lib while initial development.

$this->cache->set(
$cacheIdentifier,
strtoupper($cacheIdentifier),
$javaScript,
array_merge(
$this->cachingHelper->nodeTag($cookieNodes),
Expand All @@ -97,6 +97,8 @@ public function downloadGeneratedJavaScriptAction(string $hash)
{
$this->response->setComponentParameter(SetHeaderComponent::class, 'Content-Type', 'text/javascript;charset=UTF-8');

$hash = strtoupper($hash);

if ($this->cache->has($hash)) {
die($this->cache->get($hash));
$this->response->setContent($this->cache->get($hash));
Expand Down

0 comments on commit 9798c94

Please sign in to comment.