Skip to content

Commit

Permalink
Merge pull request #438 from jackalope/1-to-2
Browse files Browse the repository at this point in the history
1 to 2
  • Loading branch information
dbu authored Jan 30, 2024
2 parents 7809647 + 08ea218 commit 59a7b05
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ Changelog
1.x
===

1.11.2
------

* Fix: Sanitize cache key of entries with workspace name.

1.11.1
------

Expand Down
4 changes: 2 additions & 2 deletions src/Jackalope/Transport/DoctrineDBAL/CachedClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ public function createWorkspace($name, $srcWorkspace = null): void
parent::createWorkspace($name, $srcWorkspace);

$this->caches['meta']->delete('workspaces');
$this->caches['meta']->set("workspace: $name", 1);
$this->caches['meta']->set($this->sanitizeKey("workspace: $name"), 1);
}

public function deleteWorkspace($name): void
{
parent::deleteWorkspace($name);

$this->caches['meta']->delete('workspaces');
$this->caches['meta']->delete("workspace: $name");
$this->caches['meta']->delete($this->sanitizeKey("workspace: $name"));
$this->clearCaches();
}

Expand Down

0 comments on commit 59a7b05

Please sign in to comment.