Spring Cacheput不会更新现有缓存

时间:2016-11-14 19:02:36

标签: java spring redis

我正在使用redis + spring并尝试更新现有缓存

@Cacheable(value = "project")
public Project getProjectById(BigDecimal id){...}

@Caching(put = { @CachePut(value = "project", key = "#projectModel.id")})
public Project updateProject(Project projectModel)
{...}

注意: - Cacheable工作正常,只有cacheput无效。

0 个答案:

没有答案