Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1e605b0

Browse files
committed
Added optional prefix to \Phpfastcache\Core\Pool\CacheItemPoolTrait::getKeys()
1 parent 798f658 commit 1e605b0

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

‎CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## 9.2.2
2-
##### 10 january 2024
2+
##### 11 january 2024
33
- __Core__
4-
- Added internal proxy class
4+
- Added optional prefix to `\Phpfastcache\Core\Pool\CacheItemPoolTrait::getKeys()`
55

66
## 9.2.1
77
##### 07 january 2024

‎lib/Phpfastcache/Core/Pool/CacheItemPoolTrait.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,12 +617,13 @@ protected function handleExpiredCacheItem(ExtendedCacheItemInterface $item): voi
617617
/**
618618
* @param ExtendedCacheItemInterface[] $items
619619
* @param bool $encoded
620+
* @param string $keyPrefix
620621
* @return string[]
621622
*/
622-
protected function getKeys(array $items, bool $encoded = false): array
623+
protected function getKeys(array $items, bool $encoded = false, string$keyPrefix = ''): array
623624
{
624625
return array_map(
625-
static fn(ExtendedCacheItemInterface $item) => $encoded ? $item->getEncodedKey() : $item->getKey(),
626+
static fn(ExtendedCacheItemInterface $item) => $keyPrefix . ($encoded ? $item->getEncodedKey() : $item->getKey()),
626627
$items
627628
);
628629
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /