hibernate query cache specify cache duration

Posted by cometta on Stack Overflow See other posts from Stack Overflow or by cometta
Published on 2010-03-09T01:46:36Z Indexed on 2010/03/09 1:51 UTC
Read the original article Hit count: 391

Filed under:
|
|
|

below is how i do query cache

   getHibernateTemplate().setCacheQueries(true);
   List<IssSection> result = (List<IssSection>) getHibernateTemplate().findByCriteria(crit);
   getHibernateTemplate().setCacheQueries(false);

may i know how to specify duration of maximum time to cache this method? let say i want to clear cache after 5 mins expirated

© Stack Overflow or respective owner

Related posts about java

Related posts about hibernate