damienbod / AspNetCoreLocalization

Localization.SqlLocalizer & ASP.NET Core MVC Localization Examples
http://damienbod.com/2015/10/21/asp-net-5-mvc-6-localization/
MIT License
251 stars 101 forks source link

How to force Update resources without restart application ? #46

Closed houssam-saissi closed 7 years ago

houssam-saissi commented 7 years ago

Hi,

If we modify the data directly in the database, how to reset the location cache without restarting the application? Using method " _stringExtendedLocalizerFactory.ResetCache() ", we find that the data has not been updated?

public IActionResult Contact()
        {
            _stringExtendedLocalizerFactory.ResetCache();
            ViewData["Message"] = _homeLocalizerizer["ContactTitle"];

            return View();
        }

Any idea ? Thanks ^_^

damienbod commented 7 years ago

Hi @houssam-saissi , thanks for reporting. fixed in https://www.nuget.org/packages/Localization.SqlLocalizer/2.0.2

Could you please verify

houssam-saissi commented 7 years ago

Hi, Thanks, it works now :)