jeudi 12 mars 2015

Does a well designed JPA/Spring application require any caching mechenism for better performance?

There are multiple application which are built on Spring-data and JPA. JPA is a framework build on DAO and by nature it may add unnecessary queries if not design properly.


However, let's say if all database schemas are well designed with proper index and foreign keys, and the JPA code are well built, does it really matter to introduce caching mechanism(either from JPA provider or Spring) to boost performance, if there are large scale of data to process?


My only concern here is if the application is cross domain and there can be external update out side of JPA query, so basically there is high rick of inconsistency due to the nature of caching(load to memory to be faster, but not always hold the most recent data, if setup with very small interval to refresh cached data then the benefit of caching becomes very little).


Open this thread for a discussion. Will close this ticket in a week.


Aucun commentaire:

Enregistrer un commentaire