Last post Jul 10, 2014 02:35 AM by Jalpesh P. Vadgama
Jul 10, 2014 01:08 AM|Jagan Mohan|LINK
I have removed an Output Caching Rule from a site that is hosted on IIS by following this
link . Can someone explain how it can impact my site performance? If my site deals with real time information( which will be changed periodically) in that case, did i done anything wrong by removing caching rules? Excuse me if my question somehow looks
very basic or stupid.
Jul 10, 2014 02:35 AM|Jalpesh P. Vadgama|LINK
Output cache generally caches your output means suppose you have logo which never changed then you can put that in output cache. So every time user visits site it will not loaded from the server.
If your data is changing frequently then it will create a problem. So I think its advisable to not to use output cache. Another option is you can use ASP.NET Cache object. You can put your data in asp.net cache so it want visit database until it got changed.
Best way to do is like below.
When data changed/inserted fetch again values from database and put it in asp.net cache object. Then when you bind your control then see whether cahce object is null or not if not null then bind data from cache object.
This will avoid unnecessary call to database. But it is advisable only for small amount of data only. If you have large amount of data like thousands of row then it time to database optimization and query optimization.
Hope this will help you.