Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Caching is not being clear on site restart

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.

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.

like image 227
Sandeep Kumar Avatar asked Feb 23 '13 04:02

Sandeep Kumar


People also ask

Why is my website cache not clearing?

Here are some ways you can try to fix your caching problem, in order of escalation: Try holding down the Shift key while pressing the Refresh button. Close your browser and re-open it (make sure you are NOT on the cached page) and delete your temporary Internet files (clear your cache).

Does restarting server clear cache?

Yes it does. Since SQL Server is in charge of maintaining those caches, when you shut down SQL server's services, it releases the memory back to the operating system.

How do I force a cache clear?

Make sure to only select the Cached data and files box to avoid clearing important information. You can also access the menu by using the shortcut: CTRL + SHIFT + DEL. Then, click the Clear button at the bottom.


1 Answers

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.

You can read more about it.

like image 151
Allov Avatar answered Sep 22 '22 01:09

Allov