-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Cache or not cache?
PostPosted: Fri Aug 20, 2004 1:47 pm 
Regular
Regular

Joined: Mon Aug 02, 2004 9:33 am
Posts: 69
Hibernate version:2

Mapping documents:2

Name and version of the database you are using: MySQL 4.0.20c


I just wanna ask if it is ok to load list of countries from Hibernate or just hard code in JSP page?

This is because my 1st page is to ask user to select their country. Hence, should I get a list of country from Hibernate or jsut hard code inside the JSP page? If I get from Hibernate everytime, will it waste a lot of resources?

regards,
Prettyhandling


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 20, 2004 2:14 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
you can cache the countries AND the query you use to get all the countries.
It also depends if you have other object linked to country (meaning somewhere in the db there is a foreign key to country)

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.