Clear / Reset Resource Provider

How do you access the resource provider for the current context?

I have a web page that allows a client to edit their globalization values ​​that are stored in SQL.

However, pages still use the cached values ​​until the application domain is freed.

How can I force clear / reset of the provider and access it to clear its cache.

Thank,

Andy

+2


source to share


1 answer


I know this is an old question, but I ran into the same problem and couldn't find an answer. eventually i will call getobject with a predefined key which will clear the cached resources for that category

object IResourceProvider.GetObject(string resourceKey, CultureInfo culture)
    {
        if (resourceKey == GlobalConstants.RefreshResourceCacheKey)
        {
            _resourceCache = new ListDictionary();
            return null;
        }

      



It may not be the best solution, but the only one I could find

0


source







All Articles