I want to load a collection only once from the db so I don’t need to do it on each request or store it in cache.
Where can I do this in Rails 3? At one point in the application start cycle?
Also, how will this collection be made available through the site?
It might be simple enough to have a cached class method. This sort of thing comes in handy for the contents of drop-down lists which changes so infrequently it’s as good as static:
Keep in mind that class instance variables will persist for the life-span of the class itself. In the development environment this is one request, but in production this is all requests made to the same process.