Search in sources :

Example 1 with StandardCacheManager

use of org.thymeleaf.cache.StandardCacheManager in project ratpack by ratpack.

the class ThymeleafModule method provideCacheManager.

@Provides
@Singleton
StandardCacheManager provideCacheManager(Config config) {
    int cacheSize = getCacheSizeSetting(config);
    StandardCacheManager cacheManager = new StandardCacheManager();
    cacheManager.setTemplateCacheMaxSize(cacheSize);
    return cacheManager;
}
Also used : StandardCacheManager(org.thymeleaf.cache.StandardCacheManager) Singleton(com.google.inject.Singleton) Provides(com.google.inject.Provides)

Aggregations

Provides (com.google.inject.Provides)1 Singleton (com.google.inject.Singleton)1 StandardCacheManager (org.thymeleaf.cache.StandardCacheManager)1