Data Caching Doubt
-
i have a data grid which is displaying the details of empolyee such as empid,empname,empsal,empaddress i am fetching the details from database put it into a cache... i am refreshing this cache for every 5 minutes.... My question is if there is any update in the database , within the 5 minutes.. how can i update in the datagrid.. with in 5 minutes?? (after 5 minutes it will be automatically done beacuse of caching)
Aswini
-
i have a data grid which is displaying the details of empolyee such as empid,empname,empsal,empaddress i am fetching the details from database put it into a cache... i am refreshing this cache for every 5 minutes.... My question is if there is any update in the database , within the 5 minutes.. how can i update in the datagrid.. with in 5 minutes?? (after 5 minutes it will be automatically done beacuse of caching)
Aswini
You could start by asking in the right forum?! I'm not aware of an easy solution - you'd probably have to set up a trigger against your database table and have that call a piece of CLR code that reset the cache in the application... A better way would be to reconsider how you're using your cache - if the data is invalidated before the cache expires then your policy is almost certainly wrong.
It definitely isn't definatley
-
You could start by asking in the right forum?! I'm not aware of an easy solution - you'd probably have to set up a trigger against your database table and have that call a piece of CLR code that reset the cache in the application... A better way would be to reconsider how you're using your cache - if the data is invalidated before the cache expires then your policy is almost certainly wrong.
It definitely isn't definatley
And what is wrong with this forum for the question? The question seemed to be a general .net related inquiry. Have a look at SqlDependency
only two letters away from being an asset
-
i have a data grid which is displaying the details of empolyee such as empid,empname,empsal,empaddress i am fetching the details from database put it into a cache... i am refreshing this cache for every 5 minutes.... My question is if there is any update in the database , within the 5 minutes.. how can i update in the datagrid.. with in 5 minutes?? (after 5 minutes it will be automatically done beacuse of caching)
Aswini
Have a look at SqlDependencyCache http://msdn2.microsoft.com/en-us/library/ms178604.aspx[^]
only two letters away from being an asset
-
And what is wrong with this forum for the question? The question seemed to be a general .net related inquiry. Have a look at SqlDependency
only two letters away from being an asset
This post was originally in the lounge - looks like someone's been doing some housekeeping.
It definitely isn't definatley