Hi!
I need to count records amount like this:
Query qry = session.createSQLQuery("SELECT count(id) FROM object_permission_role WHERE object_permission_id=?");
as well, I am using query cache true.
How can I cache my sqlquery that returns the count(id) until someone in the code updates/delete/add any row to object_permission_role table?