Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » How to verify that result set is cached
How to verify that result set is cached [message #1488333] Wed, 26 November 2014 14:14
Radek Mensik is currently offline Radek MensikFriend
Messages: 2
Registered: November 2014
Junior Member
I know how to clean cache for result set, but for testing purposes I need to verify that cache is used.

		List<Group> byExample = groupDao.findByUserId(998);
		byExample = groupDao.findByUserId(998);  //this one should not be executed, but I dont know how to test it...
		((JpaCache)entityManager.getEntityManagerFactory().getCache()).clearQueryCache("getGroupsByUser");
		byExample = groupDao.findByUserId(998); //again from cache


Thank you for any hints.

Note: this is executed during ITDB tests.
Previous Topic:Caching queries created by Criteria API
Next Topic:How can I obtain instance of Project class so I can call setDefaultQueryResultsCachePolicy?
Goto Forum:
  


Current Time: Wed Oct 09 10:16:22 GMT 2024

Powered by FUDForum. Page generated in 0.03069 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top