| | |
| | | import com.qxueyou.scc.base.service.ICacheService; |
| | | import com.qxueyou.scc.base.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 阿里云OCS缓存服务 |
| | | * |
| | | * |
| | | * @author 德虎 |
| | | * |
| | | */ |
| | |
| | | private static final Logger log = LogManager.getLogger("RedisCacheService"); |
| | | |
| | | @SuppressWarnings("rawtypes") |
| | | @Autowired |
| | | @Resource |
| | | private RedisTemplate redisTemplate; |
| | | |
| | | @SuppressWarnings("unchecked") |
| | |
| | | ValueOperations<String, Object> ops = redisTemplate.opsForValue(); |
| | | ops.set(key, obj); |
| | | } |
| | | |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | @Override |
| | | public boolean setIfAbsent(String key, Object obj) { |
| | |
| | | public void lstRightPush(String key, Object value) { |
| | | redisTemplate.opsForList().rightPush(key, value); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | @Override |
| | | public void expire(String key,long timeout,TimeUnit unit) { |