Note, I am aware of the following questions on this topic:
Are there any performance issues or caveats with resource (.resx) files?
Are string
String resources are cached in memory. Look at the code that's generated in "Resources.Designer.cs"
.
It uses a System.Resources.ResourceManager, and this does caching of the strings.
Also note this ResourceManager constructor. It mentions that you can change caching strategy:
This constructor uses the system-provided ResourceSet implementation. To use a custom resource file format, you should derive from the ResourceSet class, override the GetDefaultReader and GetDefaultWriter methods, and pass that type to the ResourceManager(String, Assembly, Type) constructor. Using a custom ResourceSet can be useful for controlling resource caching policy or supporting your own resource file format, but is generally not necessary.
(my emphasis)
The documentation for ResourceSet explicitly says:
The ResourceSet class enumerates over an IResourceReader, loading every name and value, and storing them in a Hashtable
So we do know the exact caching strategy that you'll get by default.
[EDIT] Since you don't seem to believe me! :)
(1) Look at the documentation for the constructor ResourceManager(string baseName,Assembly assembly). It states:
This constructor uses the system-provided ResourceSet implementation.
(2) Now look at the documentation for ResourceSet. It states:
The ResourceSet class enumerates over an IResourceReader, loading every name and value, and storing them in a Hashtable.
Therefore this caching behaviour is indeed documented in MSDN, and additionally you can verify that this is what is happening by using Resharper to inspect the implementation.