protected String calcCacheKey ( String key ) { switch ( keyMode ) { case HASH : case MONOPOLISTIC : return key ; case NAMESPACE : return getName ( ) + ":" + key ; default : throw new IllegalStateException ( "Invalid key mode: " + keyMode ) ; } }
Calculates cache key based on the key mode .