tag:blogger.com,1999:blog-20633170.post565429547542464138..comments2023-11-03T10:08:09.830+00:00Comments on Graeme Rocher's Blog: Reading i18n messages from the database with GrailsGraeme Rocherhttp://www.blogger.com/profile/12301973191113958910noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-20633170.post-26875352153446830512010-04-29T22:52:06.629+01:002010-04-29T22:52:06.629+01:00Its a timely post since am doing some caching anyw...Its a timely post since am doing some caching anyway, and the approach shown is useful for other applications :) Cheers!j pimmelhttps://www.blogger.com/profile/17839471901105068871noreply@blogger.comtag:blogger.com,1999:blog-20633170.post-41550648149902855542010-04-27T19:57:47.788+01:002010-04-27T19:57:47.788+01:00I used to try very hard to do it
because google r...I used to try very hard to do it <br />because google return nothing. <br />By the way! Thanks for the caching <br />example because my implementation <br />uses Map(not efficient memory usage).hushttps://www.blogger.com/profile/16014396837526557959noreply@blogger.comtag:blogger.com,1999:blog-20633170.post-7338441857348969022010-04-21T15:54:40.231+01:002010-04-21T15:54:40.231+01:00Hi Graeme,
I've used it using Peter's sug...Hi Graeme,<br /><br />I've used it using Peter's suggestion and works very nicely.<br /><br />Thank you both for this info!<br /><br />Best regardsUnknownhttps://www.blogger.com/profile/05058727730572429065noreply@blogger.comtag:blogger.com,1999:blog-20633170.post-51358695174604539702010-04-17T16:04:54.224+01:002010-04-17T16:04:54.224+01:00You're right, this would be better done using ...You're right, this would be better done using the query cache. So basically this is the Message class:<br /><br />static mapping = {<br /> cache true<br />}<br /><br />And you're done.Graeme Rocherhttps://www.blogger.com/profile/12301973191113958910noreply@blogger.comtag:blogger.com,1999:blog-20633170.post-32156116980565929332010-04-17T15:54:44.373+01:002010-04-17T15:54:44.373+01:00Thanks for posting the info on this. Might be good...Thanks for posting the info on this. Might be good to get it into the documentation.<br /><br />On another note, wouldn't this be a good use case for a Hibernate query cache? The message table is unlikely to change much and there aren't any joins. It would save having to manage your own cache.Peter Ledbrookhttps://www.blogger.com/profile/07926972044560116057noreply@blogger.com