平安校园
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

RedisCacheHashService.cs 1.0 KiB

2 månader sedan
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. }