alibaba / alibaba/jetcache

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

Open
#511 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
5.6k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

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

依赖:
```xml

com.alicp.jetcache
jetcache-starter-redis
2.5.16

```

缓存创建逻辑:
```java
@CreateCache(
name = "xxx",
timeUnit = TimeUnit.DAYS,
expire = 7,
cacheType = CacheType.REMOTE)
private Cache xxxCache;
```

配置:
```yml
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
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Cache interface GET implementation and the @CreateCache configuration shown in the issue; no source file or test is named. Determine whether JetCache supports configuration preloading, and define completion as an option that avoids lazy-loading delay on the first call after restart, with verification for the reported timeout scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, redis
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.