Use of Entity Framework is mine.
My database contains information on people and the country of their birth. I want to know where each person is from while I'm loading a person object. Is there a method to cache the list of nations so that extra queries are avoided?
My friend Jarek has a great example Caching provider for the Entity Framework, as Luhmann has mentioned. wherein he discusses zzz-5 zzz.
However, there are situations when this strategy is excessive, and I believe that caching nations is an excellent example of a situation when the effort isn't worthwhile. Implementing some kind of ad-hoc caching could be preferable.
The main issue with attempting to do this is that an instance Entity Framework entity can only be attached to one ObjectContext at a time, which means that if you simply grab items from the cache and use them blindly when you are receiving concurrent requests (like in a website), you will run into issues.
What you need is a cloning cache, which copies items when you take them out of the cache.
I created a guide that demonstrates how to do this How to cache Entity Framework reference data is covered in Tip 14..
Hope this is useful.
Microsoft Entity Framework Team.
You should check out Jaroslaw Kowalski's superb Entity Framework provider wrappers for tracing and caching.