Hello,
- V7.3.1
- MVC
- .NET Core
I'm running into an issue with my background workers; I have a job set up to run every 5 minutes, which calls a domain service to process some data. My domain service is calling await SettingManager.GetSettingValueForApplicationAsync() to retrieve a application-level setting value.
What seems to be happening is, when I change this value through the web interface, my domain service still receives the old value. I have tried going through maintenance to flush the caches manually, but the old value is still received until I shutdown and restart the application in IIS.
Has anyone run into an issue similar to this?
4 Answer(s)
-
0
Hi rucksackdigital, Does the corresponding setting item take effect in the database?
-
0
@Zony, thanks for your reply. Yes, they do. I see them immediately in the database and also via an application service reading the same values.
-
0
Hi @rucksackdigital
Settings are cached in memory by default. Since you have two different apps accessing the settings, they are using different in memory caches.
I suggest you to use Redis for your both app's caching, see https://aspnetboilerplate.com/Pages/Documents/Caching#redis-cache-integration
-
0
D'oh! Can't believe I didn't think of that; you're 100% correct, thanks for a great product and great support, @ismcagdas