diff options
author | Vitaly Takmazov | 2019-08-02 13:37:51 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2019-08-02 13:37:51 +0300 |
commit | c8eeadee42695ed67dac47dbb9d7a66a1c9a8c6d (patch) | |
tree | 96a7d3a195fa953ecbb4637a429cbb740ac578a3 /src/main/java/com/juick/server | |
parent | 201d5d69beb431724de05908e7dabecacd6e68d7 (diff) |
Caching configuration for users and discussions
Diffstat (limited to 'src/main/java/com/juick/server')
-rw-r--r-- | src/main/java/com/juick/server/configuration/WwwAppConfiguration.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java b/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java index 635302c7..0c5c8dbf 100644 --- a/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java +++ b/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java @@ -32,6 +32,7 @@ import org.commonmark.node.Link; import org.commonmark.parser.Parser; import org.commonmark.renderer.html.HtmlRenderer; import org.springframework.beans.factory.annotation.Value; +import org.springframework.cache.CacheManager; import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.caffeine.CaffeineCacheManager; import org.springframework.context.annotation.Bean; @@ -61,8 +62,8 @@ public class WwwAppConfiguration implements WebMvcConfigurer { @Value("${img_path:#{systemEnvironment['TEMP'] ?: '/tmp'}}") private String imgDir; @Bean - public CaffeineCacheManager cacheManager() { - return new CaffeineCacheManager("help"); + public CacheManager cacheManager() { + return new CaffeineCacheManager("help", "users_by_name", "discussions"); } @Bean |