diff options
author | Vitaly Takmazov | 2019-08-09 11:46:55 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2019-08-09 11:46:55 +0300 |
commit | 3c24639c1086c94ac5ed800d0114e527b8995530 (patch) | |
tree | fb6704b3d1fe2ac83de6654bf7ae197883993aca /src | |
parent | 8f0b084a086e0acde88f07d6700d12a76d3e5cbf (diff) |
Revert "Cache autoconfiguration"
This reverts commit 0597fae5542de52a30dc60679a7f66ccea76ad51.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/juick/server/configuration/WwwAppConfiguration.java | 4 | ||||
-rw-r--r-- | src/main/resources/application.properties | 2 |
2 files changed, 4 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 da2e305d..66f1d8ce 100644 --- a/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java +++ b/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java @@ -61,6 +61,10 @@ public class WwwAppConfiguration implements WebMvcConfigurer { private TagService tagService; @Value("${img_path:#{systemEnvironment['TEMP'] ?: '/tmp'}}") private String imgDir; + @Bean + public CacheManager cacheManager() { + return new CaffeineCacheManager("help", "users_by_name", "discussions", "messages", "replies", "popular_tags"); + } @Bean public HelpService helpService() { diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 99138174..af0bee6e 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -2,5 +2,3 @@ spring.jackson.default-property-inclusion=non_default spring.jackson.serialization.write-dates-as-timestamps=false spring.h2.console.enabled=true spring.datasource.platform=h2 -spring.cache.cache-names=help, users_by_name, discussions, messages, replies, popular_tags -spring.cache.caffeine.spec=maximumSize=500,expireAfterAccess=600s |