Skip to content

Commit 38ff8e4

Browse files
[Cache] improve BC with 5.4 pools
1 parent 20cfb25 commit 38ff8e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Adapter/TagAwareAdapter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,15 @@ public function getItems(array $keys = []): iterable
171171
$bufferedItems[$key] = $item;
172172

173173
if (null === $tags) {
174-
$key = static::TAGS_PREFIX.$key;
174+
$key = "\0tags\0".$key;
175175
$tagKeys[$key] = $key; // BC with pools populated before v6.1
176176
}
177177
}
178178

179179
if ($tagKeys) {
180180
foreach ($this->pool->getItems($tagKeys) as $key => $item) {
181181
if ($item->isHit()) {
182-
$itemTags[substr($key, \strlen(static::TAGS_PREFIX))] = $item->get() ?: [];
182+
$itemTags[substr($key, \strlen("\0tags\0"))] = $item->get() ?: [];
183183
}
184184
}
185185
}
@@ -226,7 +226,7 @@ public function deleteItems(array $keys): bool
226226
{
227227
foreach ($keys as $key) {
228228
if ('' !== $key && \is_string($key)) {
229-
$keys[] = static::TAGS_PREFIX.$key; // BC with pools populated before v6.1
229+
$keys[] = "\0tags\0".$key; // BC with pools populated before v6.1
230230
}
231231
}
232232

0 commit comments

Comments
 (0)