java - Hibernate Query cache invalidation -
i using hibernate(with jpa) in application has high write-read ratio. caching have enabled query-cache , hibernate second level cache(ehcache). problem facing due automatic query cache invalidation when update done. there way configure query cache update values instead of invalidating them? also, since using queries fetch entities, avoiding query-cache not option
the query cache not useful write-mostly applications, figured out yourself. there no write-through query caching option, need question why using feature in first place.
the entity caching useful when plan on changing entities you’re querying. if need projections/views rendering table or similar, better off using native query instead , take advantage of database indexing , proper buffer pool tuning.
Comments
Post a Comment