The ResourceManager.GetObject () documentation states the following:
If you call the GetObject method multiple times with the same name parameter, do not depend on the return value being a reference to the same object. This is because the GetObject method can return a reference to an existing resource object in a cache, or can reload the resource and return a reference to a new resource object.
Does this mean the ResourceManager caches objects or not? Arriving at my rm.GetObject invocation in the debugger and running the following snippet a few times results in different hash codes each time, leading me to believe the .NET 2.0 ResourceManager implementation is not doing any caching:
object o1 = rm.GetObject (name, culture);
o1.GetHashCode ()
...
On the other hand, I assume satellite assemblies are loaded into the app domain when they're first requested and resources are sitting there in memory--negating the need for caching (apart from any custom code and the resource location\fallback logic).
Any thoughts?
Secondly, where's the best place to store a reference to a ResourceManager object in an ASP.NET app? Should it live in the HttpApplicationState or global.asax or somewhere else?