简体   繁体   English

在ASP.NET核心Web API中缓存从大量文件中读取的内容

[英]Caching content read from a large set of files in a ASP.NET core web api

I'm developing an asp.net core web api that will need to return data read from a large set of files and I'm worried about anything that may cause the app domain to shutdown meaning that this large set of file would have to be read once more on the first subsequent request. 我正在开发一个asp.net核心Web API,它将需要返回从大量文件中读取的数据,并且我担心任何可能导致应用程序域关闭的事情,这意味着必须将大量文件再次阅读第一个后续请求。

I was evaluating thus writing a windows service that would do the files reading and act as a "cache service". 我正在评估,因此编写了一个Windows服务,该服务可以读取文件并充当“缓存服务”。

I would appreciate comments on this approach. 我希望对这种方法发表评论。

您可以将文件内容存储到Redis缓存中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM