Data Change in Database

Jul 30, 2014 at 7:33 AM
Hi All,

If data was changed from the client side, the cache will work perfect.
However, if data was changed from database, the client side couldn't detect this change.
Is there any configuration for this, so that once data is changed in databse, the client side will also change?
Jul 31, 2014 at 4:24 AM
Edited Jul 31, 2014 at 4:25 AM
No that I know of. Database is not pushing changes to clients. This is why Caching Policy along with Cached() / NotCached() extension methods are so important. Caching policy allows to decide what to cache depending on the Entity sets and how long to keep results in the cache. Cached() \ NotCached() extension methods allow to hand pick queries whose results should be cached (or not cached).

Jul 31, 2014 at 7:34 AM
ok, I got it.
Aug 5, 2014 at 7:32 AM
Hi mozzzyk,

I think the default CachingPolicy need to be customized.
Currently you set max value for timeout and cacheable row, there's no way change it, except create a derived type and overwrite all the method.
I thought at least there should be a basic way for user to set policy.
Aug 6, 2014 at 7:03 AM
Why is it not OK to derive and customize it as much as you want?
Aug 8, 2014 at 3:11 AM
Yes, I know what you mean, I just want to give some suggestions, so that you can polish this project and make it better.
Aug 9, 2014 at 6:59 AM
Thanks, but I am not going to do that. There are several reasons for this but the most important is that I don't want to pretend that the caching policy can be controlled by setting some settings because typically it is not that easy. Enforcing to derive will (hopefully) make people think about caching policy and what it really is and how it is supposed to be used.

Having said that - I really appreciate your feedback and interest.

Aug 25, 2014 at 11:35 PM
Edited Aug 25, 2014 at 11:43 PM