(They are stored in the DB). But those messages will never change, so there is no need to refresh the data.
Why even use ehcache at all ? Just code it in Java without any database access. for constants like that I use an Enum or read from a property file, which is loaded postconstruction
. You could even read it from database one time instead of a proeprty file.
(and I bet those messages will change eventually ...)