ExpressMemoryCache is caching key-value pairs in memory for fast access. But when we have similar keys with different translations that are stored in different resource files only one value is stored in memory.
e.g.:
Suppose we have below localization resources:
AdminResources.resx
UserResources.Resx
And we have the below key-value pairs in both resources:
"Welcome": "Welcome admin"
"Welcome": "Welcome user"
ExpressMemoryCache will store only first key-value, and when IStringLocalizer is called for the second resource, it will retrive the value from cache that is stored for the first resource.
ExpressMemoryCache
is caching key-value pairs in memory for fast access. But when we have similar keys with different translations that are stored in different resource files only one value is stored in memory.e.g.: Suppose we have below localization resources:
And we have the below key-value pairs in both resources:
ExpressMemoryCache
will store only first key-value, and whenIStringLocalizer
is called for the second resource, it will retrive the value from cache that is stored for the first resource.