Why chosen such strict validation for cache keys? Is there any real reason to limit cache keys only with this subset of characters:
https://github.com/phalcon/cphalcon/blob/5b150e0df9d6696248b2e6e5932822fb7dec8fe2/phalcon/Cache.zep#L208
In method description said "Checks the key. If it contains invalid characters an exception is thrown", but nowhere described why other characters considered invalid
@Zaporozhec7 Some cache backends do not really care on what each key is. For instance Redis is OK with any binary string (even an empty string is valid). This is not the case for all however, hence we chose the safe route.
Additionally according to PSR-6 the keys must support characters A-Za-z0-9_.. Now the cache is a client cache not a server cache but in order to ensure that it works with PSR-6 compliant cache, we added that restriction there.
Hope this helps.
Thank you @niden for such fast and clear response