jsr107 / jsr107spec

JSR107 Cache Specification
Apache License 2.0
415 stars 164 forks source link

Allowed Characters in a Cache Name #350

Closed cruftex closed 8 years ago

cruftex commented 8 years ago

CacheManager.createCache should have information about characters in the cache name.

The Spec says on page 113:

11.2.1. Cache Name If no cache name is specified either on the method level annotation or at the class level with the @CacheDefaults annotation then the name is generated as the following: package.name.ClassName.methodName(package.ParameterType,package.ParameterType)

This means a cache implementation must allow at least the special characters for a cache name: .(), This is in the annotations sections. Legal/illegal characters in the cache name are not mentioned anywhere else.

On Spec page 132:

Caches do not use forward slashes (/) or colons (:) as part of their names. Additionally it is recommended that cache names starting with java. or javax.should not be used.

It in the section 'Portability Recommendations', so not mandatoriy.