Data Change in Database

Jul 30, 2014 at 6: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?
Coordinator
Jul 31, 2014 at 3:24 AM
Edited Jul 31, 2014 at 3: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).

Thanks,
Pawel
Jul 31, 2014 at 6:34 AM
ok, I got it.
Thanks.
Aug 5, 2014 at 6: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.
Coordinator
Aug 6, 2014 at 6:03 AM
Why is it not OK to derive and customize it as much as you want?
Aug 8, 2014 at 2: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.
Coordinator
Aug 9, 2014 at 5: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.

Thanks,
Pawel
Aug 25, 2014 at 10:35 PM
Edited Aug 25, 2014 at 10:43 PM