4.60.4 caching issue

3 日 前
AdamK wrote:
Does updating Customer settings work when you run locally?

If not, place a breakpoint on the ClearCacheAsync function in SaveSettingAsync within SettingService.cs.  Is that breakpoint being hit?    

Does your nopCommerce codebase have customization that might interfere?

What browser are you using?


Yes, updating settings works locally as expected.
I've debugged and see breakpoint is hit though.

We are developing plugin based, did not touch any of nopcommerce core code.

I will test it using a single nop installation on iis in my local.
I guess my problem is related to my server installation or configuration as running multi nop instance on single server does not seem to work properly.
3 日 前
Redis cache should be your solution, if multiple instances is the problem.
3 日 前
AdamK wrote:
Redis cache should be your solution, if multiple instances is the problem.


I migrate my application to 4.70.3 from 4.60.4 and problem still exists. I see that in 4.70 version we can add  an instance name to redis db. I will try it and will share the results.  
2 日 前
We get the exact same problem as the original post.

After editing a value in nop admin panel (Using nop 4.60.5, IIS, Memory Cache, No Redis) , saving new value, after refreshing, old values of the setting randomly appear.

See this video for an example. We edited the product name. You will see the old values of the product name randomly appear after refreshing.

https://www.dropbox.com/scl/fi/rihfuvs5y6j7q67g8agtc/Video_nop_troubleshooting_2024-07-05_14-06-18.mp4?rlkey=laxx99euni1cxe8wwujzy4scp&dl=0
2 日 前
@DaveBuchanan1337
In your case, considering all the language (locale) tabs you have, I suspect it could be related to app (or browser?) detection of the language.  Is the "random" product name you see still active in one of the other languages?
2 日 前
Hello, I've tried to use instance name of redis cache.

I tried to update it from Application Settings page but did not work, then I manually update the appsettings.json file. After some restarting and waiting for a while, I saw the new instance name on my admin panel also. So what changes??

I've tried customer settings. It is now working as expected. I can now directly see the effects of my update.

Then I tried to update topic. It is still the same. When I click save it show older value, but in db new value stored. If I click clear cache, I can see the new value in admin panel also.

Then I tried to install-uninstall a plugin. It is still the same. I can not uninstall plugin. After a couple of tries, I see that it is deleted from database, but still looks like installed in admin panel. After a few restart, I decided to update plugins.json to fix problem. I see that my plugin still in installed state in plugin.json file. Then I deleted it manually. Check the plugin page, it is still there as installed. After restarting a couple of time, it turns normal. Then i was able to re install my plugin.

So, obviously my problem related to caching, because I see the positive effects of adding redis database instance name.

Somehow, application can not delete all the cache values stored in redis or inmemory cache.

I still believe that this is not a bug, it is an configuration problem.

If it is a bug,  I don't know what to try next. Any help?
2 日 前
Assuming that you're running multiple instances in azure, the system could only be updating the plugin.json file of the one instance, resulting in what you're seeing.  I'm still a little unfamiliar with all of the different hosting configurations out there though.

Can you set up an isolated single instance on its own, and see if that instance still has these problems?

2 日 前
AdamK wrote:
Assuming that you're running multiple instances in azure, the system could only be updating the plugin.json file of the one instance, resulting in what you're seeing.  I'm still a little unfamiliar with all of the different hosting configurations out there though.

Can you set up an isolated single instance on its own, and see if that instance still has these problems?



Thanks for your response @AdamK

I have only one windows server with 3 nop instance I've mentioned before. Now I closed the Application Pool of one of the instance. The second instance is using inmemory cache. And the first application is using redis cache with db instance name.

I can try to stop second instance then check the result also. But I guess, some of the cache data are isolated when I add instance name to redis db. But still some of the cache data are being used by two instance. I guess ClearCache function is not working properly when we run multiple instance in one server.

It was a suprise for me to see "Updating Settings like Customer Settings working properly"

I did not check all of the solution pages but I only recognized 3 points that not working properly before.

1 - Updating Settings (fixed with redis db instance name)
2 - Install-Uninstall plugin (still the same)
3 - Updating Topics (Still the same)
1 日 前
New York wrote:
@DaveBuchanan1337
In your case, considering all the language (locale) tabs you have, I suspect it could be related to app (or browser?) detection of the language.  Is the "random" product name you see still active in one of the other languages?


@New York. Thanks for replying.

Actually no, this product is a test product, we didn't configure any locale value for product name. It only has the value in product table defined.