Top Menu not refreshing

1 year ago
Hi

If I change Category parameters programmatically for instance IncludeInTopMenu = 1 or 0 then Top Menu is not refresh automatically. I have to restart page on IIS and than I see effect.
How can I solve this? What should I do that page refresh automatically?

Karno
1 year ago
You'll need to clear relevant cache keys. See Nop.Web\Factories\CatalogModelFactory.cs file and look for TopMenu action method to see the cache keys that'll need to be cleared.

Regards,
Anshul
1 year ago
RoastedBytes wrote:
.. TopMenu action ..


Correction: PrepareTopMenuModel method
1 year ago
Thank you for the answer. And I already ask myself why this cacheManager is for.
Is it possible that caches is automatically cleared after some period of time?
1 year ago
bulb wrote:
Thank you for the answer. And I already ask myself why this cacheManager is for.
Is it possible that caches is automatically cleared after some period of time?


Yes, there is a scheduled task for that. Visit Admin > ScheduleTask > List to see that.

Regards,
Anshul
1 year ago
Hi, the menu is not refreshed even though I ran the Task. What else could be the reason?