-->
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.  [ 1 post ] 
Author Message
 Post subject: Static Data (Best practices question)
PostPosted: Sat Dec 12, 2009 11:56 pm 
Newbie

Joined: Sat Dec 12, 2009 11:51 pm
Posts: 2
Hey all,

let's say you have a website that needs to be multilingual - so you create a table like this:

ws_text
ws_text_id (int)
ws_language_id (int)
ws_text_code (string)
ws_text_value (string)
ws_last_modified (datetime)

and you have a similar mapped hibernate object.

The thing is this data RARELY changes, so there is no need to request it from the database every time a user hits the website. However it does change SOMETIMES (say once every couple months). Is there a good way to map say the last_modified column in hibernate so it caches the request until the last_modified date changes? Or would you use a cron job to refresh the text once every 48 hours? Or, what do you think is the best way to handle data that rarely changes?

Any help would be appreciated


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

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.