@Cached 能否自定义Key,不使用Spel表达式
- Dominant language
- Java
- Stars
- 5.6k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
现在我想要使用一个固定的字符串作为Key,类似于下面的例子,但是会报SpEL解析错误
```
@Cached(area = "test", name = "name", key = "key1")
public Response getResponse(){
}
```
`org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'key1' cannot be found on object of type 'com.alicp.jetcache.anno.method.SpringCacheInvokeContext' - maybe not public or not valid`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the @Cached annotation's key handling and SpringCacheInvokeContext, then trace how the key is evaluated by Spring SpEL. Done means a fixed string such as "key1" is accepted as the cache key without a SpEL property-resolution error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100