Cache Results of Db queries and Keep them updated
My usecase is
I want to cache results of few database queries in memory so that when same query is repeated again, results can be returned from memory.
Data can get modified at source DBs. In that case, I want Cache/Query Results to get reflected with changes in data on source
I want to design a system in generic way so that users can configure queries etc.
My question is that is there any framework/tool provides this kind of functio开发者_运维问答nality?
Hibernate etc support caching but their usage is justified only for rarely changed objects. They are not good at caching Objects which are more prone to changes.
Yes, you want to look at the query cache support.
You may try to use Hibernate Dynamic SQL Cache module
精彩评论