In my rails app, I have a categories table which only has around 10 rows. There is an association whereby Post belongs to Category. Rather than eager loading categories for every single Post query, since it's a small table would there be a way to eager load the whole table once when the application starts and thereby avoid additional queries when calling the post.category association method?
I think I can achieve a similar effect using a global variable but it would be nice to be able to use the standard 'category' association.