站点重启时缓存不明确 [英] Caching is not being clear on site restart

查看:38
本文介绍了站点重启时缓存不明确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用单例模式来加载数据库中的一些配置.如果我在数据库中添加一些新配置并重新启动 web 服务,则它不会加载这些设置.为此,如果我确实重新启动了 IIS 服务器,则它可以正常工作.

I am using singleton pattern to load some configurations which are in database. If I add some new configurations in database and restart the webservice then it doesn't load those settings. For this If I do restart the IIS server then it works fine.

我不确定它驻留在何处?它是否已加载到 App Domain 中并且我还需要重新启动 AppDomain?我不清楚为什么会这样.因为如果我从 IIS 重新启动服务,它也应该清除应用程序域中的所有信息,但不会发生.

I am not sure where does it reside?Is it loaded in App Domain and I need to restart AppDomain also? I m not clear why this is happening. Because if I restart the service from IIS it should clear all the information from app domain too but not happening.

推荐答案

停止网站只会停止接受请求,同时保持您的应用程序处于相同状态.工作进程不会停止.

Stopping the Website will only stop accepting request while keeping your application in the same state. Worker process won't stop.

要重新启动工作进程,从而刷新内存,您需要回收应用程序池.

To restart the worker process, thus flushing the memory, you need to recycle the Application Pool.

您可以阅读更多相关信息.

这篇关于站点重启时缓存不明确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆