Reputation: 27
I have a MetaTags table on a MS-SQL database. The Master page of my site reeds this info everytime a page is load.
I'd like to use a ASP.NET cache object in order to improve performance, so I don't have to access the db everytime.
Someone gave me the idea of using a time based expiration cache and also a sql based expiration trigger.
Could someone please help me to decide which aproach is better and give me an example of some lines of code to develop it?
Thanks a lot.
Upvotes: 1
Views: 451
Reputation: 4014
It sounds like they are describing the SqlCacheDependency
class SqlCacheDependency MSDN Article
You could also just repopulate the cache yourself when the item expires. Notify an Application When an Item Is Removed from the Cache
Upvotes: 2