Adapters must provide the maximum supported key length
boesing opened this issue · 1 comments
Feature Request
Q | A |
---|---|
New Feature | yes |
BC Break | yes |
Summary
I'd like to introduce a new AdapterOptions
method which provides the maximum key length an adapter supports.
While implementing PHP 8.0 for the memcache adapter we found out, that the SimpleCacheDecorator
checks for a maximum of 64 characters for the key.
The PSR-16 standard states, that a cache storage must support at least 64 characters but may support longer ones.
So instead of blocking keys longer than 64 characters, we should block keys longer than the maximum limit of the underlying cache adapter.
So in the end, the SimpleCacheDecorator
can be improved based on this addition.
Closing this as it seems that all cache adapters already implement their maximum key length with the Capabilities::getMaxKeyLength
.