ZF-8633: Locale corruption of Zend_Cache IDs

Description

Zend_Cache_Core defines a method to validate IDs, stated to match the pattern [a-zA-Z0-9_]. In reality, the regular expression used is [\w]+. While ordinarily this is correct, on a system where PECL has been compiled with additional locales, the \w "word" will match additional locale specific characters. In order to avoid this, the regular expression used should be made explicit to avoid such additional character matches.

Comments

There's a similar misuse in Zend_Cache_Backend_File when checking a filename.

fixed in r21221 (trunk) & r21223 (1.10 branch)