public static JawrCacheManager getCacheManager ( JawrConfig config , String resourceType ) { String cacheMgrAttributeName = CACHE_ATTR_PREFIX + resourceType . toUpperCase ( ) + CACHE_ATTR_SUFFIX ; JawrCacheManager cacheManager = ( JawrCacheManager ) config . getContext ( ) . getAttribute ( cacheMgrAttributeName ) ; if ( cacheManager == null ) { String cacheManagerClass = config . getProperty ( CACHE_PROPERTY_NAME , BasicCacheManager . class . getName ( ) ) ; cacheManager = ( JawrCacheManager ) ClassLoaderResourceUtils . buildObjectInstance ( cacheManagerClass , new Object [ ] { config } ) ; config . getContext ( ) . setAttribute ( cacheMgrAttributeName , cacheManager ) ; } return cacheManager ; }
Retrieves the cache manager for a resource type