protected String generateCacheKey ( HttpServletRequest request , Map < String , ICacheKeyGenerator > cacheKeyGenerators ) throws IOException { String cacheKey = null ; if ( cacheKeyGenerators != null ) { // First, decompose any composite cache key generators into their // constituent cache key generators so that we can combine them // more effectively. Use TreeMap to get predictable ordering of // keys. Map < String , ICacheKeyGenerator > gens = new TreeMap < String , ICacheKeyGenerator > ( ) ; for ( ICacheKeyGenerator gen : cacheKeyGenerators . values ( ) ) { List < ICacheKeyGenerator > constituentGens = gen . getCacheKeyGenerators ( request ) ; addCacheKeyGenerators ( gens , constituentGens == null ? Arrays . asList ( new ICacheKeyGenerator [ ] { gen } ) : constituentGens ) ; } cacheKey = KeyGenUtil . generateKey ( request , gens . values ( ) ) ; } return cacheKey ; }
Generates a cache key for the layer .