In my grails application, some of my domain classes will never be changed by Users.
However, some maintenance work is sometimes necessary, and administrator should be able to create/edit few instances from time to time (let's say twice a year).
I would like to set a read-only 2nd level cache strategy for these domain classes (static mapping = { cache usage: 'read-only' }
) AND I would like to be able to 'disable' (in very particular situations) the read-only strategy in order to udate some instances via Grails scaffolding edit view.
Is it possible? What do you advise me to do?
EDIT: The solution I am implementing is a mix of Pascal and Burt answers (see comments). Both answers are great and helpful. So I got a dilemna for choosing the accepted answer! Anyway, thank you.