Class RedisCacheServiceImpl

java.lang.Object
cn.toint.oktool.service.impl.RedisCacheServiceImpl
All Implemented Interfaces:
CacheService

public class RedisCacheServiceImpl extends Object implements CacheService
Author:
Toint
  • Constructor Details

    • RedisCacheServiceImpl

      public RedisCacheServiceImpl()
  • Method Details

    • put

      public void put(String key, String value, Duration timeout)
      Description copied from interface: CacheService
      设置缓存
      Specified by:
      put in interface CacheService
      Parameters:
      key - 缓存键, 不能为空
      value - 缓存值
      timeout - 缓存时间, 不能为空
    • get

      public String get(String key)
      Description copied from interface: CacheService
      获取缓存
      Specified by:
      get in interface CacheService
      Parameters:
      key - 缓存键