Far faster respone to database queries, I need to have a Cache in Java that mirrors the database. Now, this cache should be intelligent enough to determine:
1. what kind of data is queries very often and keep that at the top far faster access.
2. Should synch with database automatically after certain interval so as to avoaid staleness of the data.
3. Other components should push certain data changes/updates to this cache and the cache should in turn synchronise the database.
Appreciate any idea/code how to implement such a cach and the underlying smart algorithm??