平安校园
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.

CacheSettingsOptions.cs 865 B

3 kuukautta sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using MoYu.ConfigurableOptions;
  2. namespace SafeCampus.Cache;
  3. /// <summary>
  4. /// 缓存设置
  5. /// </summary>
  6. public class CacheSettingsOptions : IConfigurableOptions
  7. {
  8. /// <summary>
  9. /// 使用Redis
  10. /// </summary>
  11. public bool UseRedis { get; set; }
  12. /// <summary>
  13. /// Redis设置
  14. /// </summary>
  15. public RedisSettings RedisSettings { get; set; }
  16. }
  17. /// <summary>
  18. /// Redis设置
  19. /// </summary>
  20. public class RedisSettings
  21. {
  22. /// <summary>
  23. /// 连接地址
  24. /// </summary>
  25. public string Address { get; set; }
  26. /// <summary>
  27. /// 密码
  28. /// </summary>
  29. public string Password { get; set; }
  30. /// <summary>
  31. /// 数据库
  32. /// </summary>
  33. public int Db { get; set; } = 0;
  34. /// <summary>
  35. /// 是否每次启动都清空
  36. /// </summary>
  37. public bool ClearRedis { get; set; } = false;
  38. }