安装 SmartSql.Cache.Redis

Install-Package SmartSql.Cache.Redis

Cache 配置

<Cache Id="T_Test.RedisCache" Type="SmartSql.Cache.Redis.RedisCacheProvider,SmartSql.Cache.Redis">
  <Parameter Key="CacheSize" Value="1000"/>
  <Parameter Key="ConnectionString" Value="192.168.31.103"/>
  <Parameter Key="DatabaseId" Value="0"/>
  <FlushInterval Hours="24" Minutes="0" Seconds="0"/>
  <FlushOnExecute Statement="T_Test.Insert"/>
  <FlushOnExecute Statement="T_Test.Update"/>
</Cache>

Demo

<Statement Id="GetListByRedisCache" Cache="T_Test.RedisCache">
      SELECT Top 10 T.* From T_Test T With(NoLock)
      <Include RefId="QueryParams"/>
    </Statement>

相关文章:

  • 2021-07-26
  • 2021-08-26
  • 2022-12-23
  • 2022-12-23
  • 2021-09-12
  • 2021-12-14
  • 2022-01-13
  • 2022-02-12
猜你喜欢
  • 2021-07-01
  • 2021-04-23
  • 2021-11-14
  • 2021-09-05
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案