feat: add psr-16 implementation - #77
Conversation
d8b4cab to
41c6349
Compare
| /** | ||
| * @return Generator<string, mixed> | ||
| */ | ||
| public function getMultiple(iterable $keys, mixed $default = null): iterable |
There was a problem hiding this comment.
Is it ok, like Generator?
|
|
||
| public function clear(): bool | ||
| { | ||
| $this->storage->clean([Nette\Caching\Cache::All => true]); |
There was a problem hiding this comment.
Method clear is missing in tests.
| "tracy/tracy": "^2.9", | ||
| "phpstan/phpstan": "^1.0" | ||
| "phpstan/phpstan": "^1.0", | ||
| "psr/simple-cache": "^2.0 || ^3.0" |
There was a problem hiding this comment.
I didn't add dependency for version 1.0.
3bc4e14 to
d31b325
Compare
|
@JanTvrdik I squashed all commits, thank you. |
d31b325 to
15eaa3d
Compare
|
What is next step? |
|
Great, thank you |
|
I'm thinking, does it matter that there is no namespace support (for keys)? Or is it common in the case of PSR-16 to handle it one level up? |
|
Laravel has both. The base Repository implements PSR-16 does not support namespace and extends TaggedCache has namepsace. Symfony implementation PSR-16 does not use namespace. The key is delegate to pool (PSR-6) where is namespace. On one project I use namespaces, on another project I don't use namespaces and we keep all prefixes in one file like a class constants. If you want namespace. I will add optional parameter to contructor. |
I prepared PSR-16 implmentation.