sabre-io / cache

:handbag: Simple cache abstraction layer implementing PSR-16
BSD 3-Clause "New" or "Revised" License
54 stars 10 forks source link

$key is not interpolated #34

Closed dvikan closed 3 years ago

dvikan commented 3 years ago

https://github.com/sabre-io/cache/blob/042e4b24cea4347321739bc5470e78749bc27ffe/lib/Memcached.php#L81

staabm commented 3 years ago

Could you elaborate a bit?

dvikan commented 3 years ago

Ah my mistake.

I thought the intention was to include the content of $key but I see now that you always want the literal string '$key must be a string'.

Edit: do you know why they didnt type hint string in the psr interface?

staabm commented 3 years ago

Edit: do you know why they didnt type hint string in the psr interface?

I guess not all cache backends necessarily use only strings as cache-keys.

will close the issue for now, feel free to ask further related questions