Coder Social home page Coder Social logo

Comments (3)

JeffreySu avatar JeffreySu commented on May 29, 2024

这个修改是不需要的:
第一,Config.SenparcSetting.Cache_Redis_Configuration 在初始化的时候已经从 appsettings.json 里面取值了(除非你没有按照标准初始化)。
第二,看一下这里的静态构造函数 static BaseRedisObjectCacheStrategy(),里面已经有赋值:

RedisManager.ConfigurationOption = Config.SenparcSetting.Cache_Redis_Configuration;

所以正常情况下,即使你用了 RedisManager.ConfigurationOption,值也是和 Config.SenparcSetting.Cache_Redis_Configuration相等的。

感谢交流!

from senparc.co2net.

zhulj avatar zhulj commented on May 29, 2024

微信的所有配置都是从DB取值 ,SenparcWeixinSetting 基本上没用到;
缓存从以下配置设置
Senparc.CO2NET.Cache.CsRedis.Register.SetConfigurationOption(redisConnection);
Senparc.CO2NET.Cache.CsRedis.Register.UseKeyValueRedisNow();
+
app.UseSenparcGlobal(env,null,
{
register.UseSenparcWeixinCacheCsRedis();
});
就可以启用
这配置在MP AccessToken/JsapiToken 可以正常使用
可是为于MessageHandler 上下文缓存不能生效

from senparc.co2net.

JeffreySu avatar JeffreySu commented on May 29, 2024

MessageHandler 的缓存也是依赖于整体缓存策略的,所以需要按照 Sample 提供的注册过程,完整注册下来。否则默认就是用内存缓存。

from senparc.co2net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.