c# - No sharing cache, using IMemoryCache - Stack Overflow

My api depends on some programs that are expensive to start up for each call. I am trying to inject a c

My api depends on some programs that are expensive to start up for each call. I am trying to inject a cache that contains the cached objects wrapping the programs so they can be reused without killing executables between calls to my api.

Before trying to use a cache each call would start up their own instance of a program and run, which is important as it is wrapped COBOL programs with static variables.

My problem is that I'm not sure how I use the cache such that the cached objects are exclusive while used by a call. I want another program to be started up if another call has already hit the cache with the same key and is still using that value. Would be great if I can somehow build up a pool as needed for each program, some a used a lot, some rarely.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745083369a4610260.html

相关推荐

  • c# - No sharing cache, using IMemoryCache - Stack Overflow

    My api depends on some programs that are expensive to start up for each call. I am trying to inject a c

    14小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信