平安校园
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

RedisCacheHashService.cs 1.0 KiB

3 月之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. 
  2. namespace SafeCampus.Cache;
  3. /// <summary>
  4. /// <inheritdoc cref="ISimpleCacheService"/>
  5. /// Redis缓存
  6. /// </summary>
  7. public partial class RedisCacheService
  8. {
  9. /// <inheritdoc/>
  10. public void HashAdd<T>(string key, string hashKey, T value)
  11. {
  12. _simpleRedis.HashAdd<T>(key, hashKey, value);
  13. }
  14. /// <inheritdoc/>
  15. public bool HashSet<T>(string key, Dictionary<string, T> dic)
  16. {
  17. return _simpleRedis.HashSet<T>(key, dic);
  18. }
  19. /// <inheritdoc/>
  20. public int HashDel<T>(string key, params string[] fields)
  21. {
  22. return _simpleRedis.HashDel<T>(key, fields);
  23. }
  24. /// <inheritdoc/>
  25. public List<T> HashGet<T>(string key, params string[] fields)
  26. {
  27. return _simpleRedis.HashGet<T>(key, fields);
  28. }
  29. /// <inheritdoc/>
  30. public T HashGetOne<T>(string key, string field)
  31. {
  32. return _simpleRedis.HashGetOne<T>(key, field);
  33. }
  34. /// <inheritdoc/>
  35. public IDictionary<string, T> HashGetAll<T>(string key)
  36. {
  37. return _simpleRedis.HashGetAll<T>(key);
  38. }
  39. }