Skip to main content


 

Symptoms

 


CSS changes take a while to show. Assume you changed CSS files for a theme but see that the changes take a up to one day to be visible in end user's browser. Does K2 cache these files? if so is there a way to clear/disable the cache whilst developing?
 

 

Diagnoses 
 
It is possible to disable cache entirely in development environments, but this is not recommended for production environments. Additionally you have to keep in mind that apart from server cache (IIS side) there is also a client cache and those works independently of each other.

 

It means that sometimes you may see that IIS reset doesn't help you to see changes reflected on the client side. This is because of the fact that when you do an IISReset the IIS cache will be cleared and then will start to be rebuilt after it starts back up as client requests come in. If you update a file then the older cached file will become stale and IIS will serve the updated file and update the cache with the new file. IISReset will clear the IIS cache but it won't do anything with local caches in proxies or clients. There isn't any concept of "resent" when it comes to caching. It's all request based. If a client requests something and it's found in a cache then it'll get served from the cache. You'll need to force content expiration on your files if you will be maintaining the same filenames.

 

Possible workarounds to client cache problem apart from obvious manual browser cache clear up (from browser optrions or developer tools) can also be:

 


1) You can try if this Expire Web Content option (see details/limitations above).
2) You can look into clearing IE cache via group policy (most likely you can leverage "Empty Temporary Internet Files folder when browser is closed")
3) You can use logon script/SCCM task which will execute some script/commands to ensure browser cache clear up. For example these commands can be used:
All:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255

 

History:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1

 

Cookies:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2

 

Temp Internet Files:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8

 

Form Data:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16

 

Passwords:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32

 

OR

 

All:
rundll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351

 

 

 

Resolution


SmartForms is heavily cached for performance. This cache causes theme changes not to show up.

So there are 2 ways to affect the changes immediately

a) Recycle the application pool, or do an IISRESET.

or and this is ONLY for testing , development purposes , because in live Environment this will cause performance issues

Disable this cache by changing the Forms.CombinedResources.Cache.Enabled value to False in the web.config of both the design and runtime site

 

 



 
Be the first to reply!

Reply