Interface CacheService

All Known Implementing Classes:
LocalCacheServiceImpl, RedisCacheServiceImpl

public interface CacheService
缓存服务
Author:
Toint
  • Method Summary

    Modifier and Type
    Method
    Description
    get(String key)
    获取缓存
    void
    put(String key, String value, Duration timeout)
    设置缓存
  • Method Details

    • put

      void put(String key, String value, Duration timeout)
      设置缓存
      Parameters:
      key - 缓存键, 不能为空
      value - 缓存值
      timeout - 缓存时间, 不能为空
    • get

      String get(String key)
      获取缓存
      Parameters:
      key - 缓存键