Why do I need to restart the site to make changes take effect?

Posted By WithaG Fri 28 Feb 2014
Add to Favorites0
Author Message
WithaG
 Posted Fri 28 Feb 2014
Supreme Being

Supreme Being - (6,469 reputation)Supreme Being - (6,469 reputation)Supreme Being - (6,469 reputation)Supreme Being - (6,469 reputation)Supreme Being - (6,469 reputation)Supreme Being - (6,469 reputation)Supreme Being - (6,469 reputation)Supreme Being - (6,469 reputation)Supreme Being - (6,469 reputation)

Group: Forum Members
Last Active: Mon 19 Nov 2018
Posts: 12, Visits: 46
I'm new to .net 4 but am experienced in .NET 3.5 and basic IIS set up but I'm confused as to why I must keep triggering a full site restart with Kartris to get certain changes to take effect.

For example, I understand that if I customise the main shop menu via the web_menu.sitemap nothing happens without a restart. Not sure why as I've never used .sitemaps before, but I don't know any different.

But today I needed to move my kartris installation into its own "shop" sub folder and I knew the base url setting could be managed within the administration area. I changed the two strings in the database and navigated to the site in its new location but it lost all its styles, relative links were wrong etc etc and refreshes did nothing until I restarted the site, which struck me as odd if the application is reading that setting dynamically.

I'm just interested to know if this a .net 4 thing or is it to do with the way this particular application has been written?
Paul Marked As Answer
 Posted Fri 28 Feb 2014
große Käse

große Käse - (451,180 reputation)große Käse - (451,180 reputation)große Käse - (451,180 reputation)große Käse - (451,180 reputation)große Käse - (451,180 reputation)große Käse - (451,180 reputation)große Käse - (451,180 reputation)große Käse - (451,180 reputation)große Käse - (451,180 reputation)

Group: Administrators
Last Active: Fri 15 Sep 2023
Posts: 806, Visits: 2,737
Kartris uses caching extensively. In some cases, especially with db content, we can invalidate caches when the content changes, and so automatically trigger the cache to update. We also have a 'refresh cache' button in the left hand back end menu which clears all the db caches.

Some content like the sitemaps runs from files which are updated via FTP rather than by an ASP.NET page, so we can't programmatically clear caches in the same way. The NavigationMenu user control (skins user controls folder) is set to cache for 3600 seconds (an hour). If you need to change your menus regularly, you can edit this file and change the cache value (near top of page) to a lower value, but typically we find these things don't change often once a site is running, so a long cache does not pose any problems.

Did you change the config values direct in the db or via the back end of Kartris? These values are cached for performance, because many pages use the values and they generally don't change often on a store that is set up and running. If you change them from the back end, it should rebuild the cache. If you changed them manually in the db, the code to refresh the cache would not be triggered, so you would not see the effect until restarting or (i think) using the cache refresh button in the back end, left hand menu.

One other place we have noticed that caching can happen is in images. If you upload an image for some things like categories and versions, then try to change it, the site might not show the updated one. This is because the names of the files for these is fixed, and IIS seems to cache these using the name as a key, and so does not acknowledge the change. Even turning of kernel cache and caching at IIS does not seem to help. In these cases, a restart also clears the problem.

We've generally opted where possible for performance over convenience. Some of these things can introduce a little complexity or delays, or in some cases require a restart, but this is normally only the case on the kind of things that would be changed rarely in general operation (menu links, etc.). Changes to products and such should feed through immediately (aside from the image issue mentioned above), as should changes to the config settings if they are done via the back end. You can turn down the caching time for menus and so on from the controls, but we feel it's best to leave them where they are and just do the restart when you do change these things.


--
If my post solves your issue, can you 'Mark as Answer' so it's easier for other users to find in future.

If you would like to be informed of new features, new releases, developments and occasional special bonuses, please sign up to our mailing list: http://bit.ly/19sKMZb
WithaG
 Posted Tue 4 Mar 2014
Supreme Being

Supreme Being - (6,469 reputation)Supreme Being - (6,469 reputation)Supreme Being - (6,469 reputation)Supreme Being - (6,469 reputation)Supreme Being - (6,469 reputation)Supreme Being - (6,469 reputation)Supreme Being - (6,469 reputation)Supreme Being - (6,469 reputation)Supreme Being - (6,469 reputation)

Group: Forum Members
Last Active: Mon 19 Nov 2018
Posts: 12, Visits: 46
Thanks. I'm pretty sure I changed the webshop folder setting in the backend admin tools but I know I initially edited the database directly for webshopurl so it probably failed to update both values in the cache leading to the site problems.

Thanks for the explanation and thanks for pointing out the refresh button, I'd just assumed that was for updating the categories menu but now I've hovered over it I can see it refers to the cache!
Tue 4 Mar 2014 by WithaG

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top