重新启动站点时缓存不清晰 [英] Caching is not being clear on site restart

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

问题描述

我正在使用单例模式来加载数据库中的某些配置.如果我在数据库中添加了一些新配置并重新启动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天全站免登陆