Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

有没有缓存配置预加载的选项 #511

Open
LaudOak opened this issue Sep 8, 2020 · 0 comments
Open

有没有缓存配置预加载的选项 #511

LaudOak opened this issue Sep 8, 2020 · 0 comments

Comments

@LaudOak
Copy link

LaudOak commented Sep 8, 2020

我们应用重启后首次调用接口会出现超时的情况,看了下Cache接口的GET方法内部实现有懒加载配置的逻辑,导致首次超时;请问有没有配置预加载选项;

依赖:

<dependency>
            <groupId>com.alicp.jetcache</groupId>
            <artifactId>jetcache-starter-redis</artifactId>
            <version>2.5.16</version>
 </dependency>

缓存创建逻辑:

    @CreateCache(
            name = "xxx",
            timeUnit = TimeUnit.DAYS,
            expire = 7,
            cacheType = CacheType.REMOTE)
    private Cache<String, String> xxxCache;

配置:

jetcache:
  statIntervalMinutes: 15
  areaInCacheName: false
  hiddenPackages: true
  local:
    default:
      type: linkedhashmap
      keyConvertor: fastjson
      limit: 1000
      expireAfterWriteInMillis: 3600000
  remote:
    default:
      type: redis
      keyConvertor: fastjson
      valueEncoder: java
      valueDecoder: java
      host: 127.0.0.1
      port: 6379
      password: 
      poolConfig:
        minIdle: 5
        maxIdle: 20
        maxTotal: 50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant