We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@Mapper public interface UserMapper { @CacheInvalidate(name = "UserMapper:", key = "#args[0]") int deleteByPrimaryKey(Long id); @CacheInvalidate(name = "UserMapper:", key = "*") int insertSelective(UserDO record); @Cached(name = "UserMapper:", key = "args[0]", expire = 3600, localExpire = 3500, timeUnit = TimeUnit.SECONDS, cacheType = CacheType.BOTH) UserDO selectByPrimaryKey(Long id); @CacheUpdate(name = "UserMapper:", key = "args[0].id", value = "args[0]") int updateByPrimaryKeySelective(UserDO record); @CacheUpdate(name = "UserMapper:", key = "args[0].id", value = "args[0]") int updateByPrimaryKey(UserDO record); int batchInsert(@Param("list") List<UserDO> list); @Cached(name = "UserMapper:", key = "'status:' + args[0]", expire = 3600, localExpire = 3500, timeUnit = TimeUnit.SECONDS, cacheType = CacheType.BOTH) List<UserDO> selectByStatus(Integer status); List<UserDO> selectAll(); }
在这种使用场景下,不仅要根据ID做缓存,还需要根据某个状态status做缓存,为了保证数据正确性,在新增的时候需要清理缓存,需要根据 @CacheInvalidate(name = "UserMapper:") 进行清理全部名称前缀为UserMapper:的缓存,是否支持这样的功能?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
在这种使用场景下,不仅要根据ID做缓存,还需要根据某个状态status做缓存,为了保证数据正确性,在新增的时候需要清理缓存,需要根据 @CacheInvalidate(name = "UserMapper:") 进行清理全部名称前缀为UserMapper:的缓存,是否支持这样的功能?
The text was updated successfully, but these errors were encountered: