1: The website will get new translations and changes but in a very infrequent basis (say once every 6 weeks)
2: There is no need to hit repeatedly hit the database for the hundreds of thousands of users hitting this website just to get the website text.
3: It makes more sense to simply store all of this text in application memory (on the webserver) and pull it from there and have this application memory periodically check for changes (once every 24 hours)
4: Rather then have the change set to set time (24 hours) I'd rather hibernate routinely check the "last_modified" date of the text it has cached, if it has changed then update
So here's the table in question
language_id (foriegn key to language table)
so I would say "get me text id 5 for language 23" and instead of going to the database it would simply return that object from memory.
Now, I can write this up myself. But I'm wondering if you all had any recommendations for best practice in a situation like this.
So, whenever you fetch value from appliction scope, then fetch saved_date also. and compare it saved date is 6 days old than today's date. If yes, then do database operations and set both values again.