I have a problem with clearing the cache. The site keeps showing content that is cached. I'm going to explain my setup:
My local environment is run from Visual Studio with the database in Azure.
My staging environment is running in Azure on THE SAME database. I realize this is not perhaps kosher, but it's very practical while developing and staging.
Scenario: I delete a node from my local instance, then publish the site (touching web.config), surf to the staging environment (which has the same database, remember?). In backoffice I see the node is deleted, but when surfing the site it still shows up. I have tried republishing home and all sub nodes with no result.
If I delete umbraco.config the problem is solved, but since I run on Azure I don't have direct access to the files, so that means replacing ALL files on the server with my local copy, which could be problematic for other reasons.
Is there a sane way to clear the cache and make sure the content is pulled from the database?
If you are running on Azure Websites, you can FTP to your site location and access individual files. If you go to the site dashboard in the website management portal the FTP information is shown there. That's also where you setup the Deployment/FTP credentials.
That's not ideal either, but it might work until we have a better solution from Umbraco.
I went with Waynes solution with using FTP to remove the umbraco.config. Since then I try to do all editing on the staging environment instead of the local environment.
I constantly experience the same issue. Extremely frustrating. We are hosting the site on our own webserver. Republishing nodes or the entire site doesn't help.
http;//YOURDOMAIN/Umbraco/dialogs/republish.aspx?refreshNodes or http;//YOURDOMAIN/Umbraco/dialogs/republish.aspx?previews=true or http;//YOURDOMAIN/Umbraco/dialogs/republish.aspx?xml=true didn't work.
This is still an issue in Umbraco 7.2.6, it's a bit frustrating having people calling telling me that publishing of the content isn't working. I have to clear the umbraco.config manually and republish the entire website over and over. Is there a way around this?
Either publish or unpublish a content, in frontend i am viewing the cached data from umbraco.config. In log i am getting the result that the xml has been loaded but the in-memory cache does not serve the correct content. I tried to create a code, on save event to delete the umbraco.config before the saving in order to recreate the file from scratch but still nothing. The in-memory cache does not clear to force reload the content from the file. The only solution is to recycle the application pool, which is not good.
Technically, what you are doing is load-balancing your site accross two servers. The fact that one of the servers is not an actual, front-end server, but a staging server, does not make a difference: you are running a load-balanced environment.
Because they share the same database, changes made at database level by one server are visible by the other server. However, if load-balancing of Umbraco is not properly configured, everything else--including cache refreshes, etc--is not going to work.
Hence, the result you are seeing: the content is not published anymore in the database (or even, deleted), but still, the other server has it in its in-memory cache and umbraco.config file.
This is expected.
The only way you can get it to work is to setup Umbraco load-balancing. Upgrading to 7.3.0 should greatly simplify this, as LB is practically automatic and uses the database to exchange cache notifications between servers. With 7.2.x, it can be way more complex, expecially when the servers are not in the same network environment.
I use the Kudu console to get directly onto the Azure Web App and delete the umbraco.config file.
Not sure if this needs setting up explicitly but all I do to access Kudu is to add .scm. between the web app name and azurewebsites.net in the Cname record
Content cache in Umbraco 7
I have a problem with clearing the cache. The site keeps showing content that is cached. I'm going to explain my setup:
My local environment is run from Visual Studio with the database in Azure.
My staging environment is running in Azure on THE SAME database. I realize this is not perhaps kosher, but it's very practical while developing and staging.
Scenario: I delete a node from my local instance, then publish the site (touching web.config), surf to the staging environment (which has the same database, remember?). In backoffice I see the node is deleted, but when surfing the site it still shows up. I have tried republishing home and all sub nodes with no result.
If I delete umbraco.config the problem is solved, but since I run on Azure I don't have direct access to the files, so that means replacing ALL files on the server with my local copy, which could be problematic for other reasons.
Is there a sane way to clear the cache and make sure the content is pulled from the database?
Best,
Daniel
Hello,
Maybe this wiki can help: http://our.umbraco.org/wiki/reference/api-cheatsheet/publishing-and-republishing
You could try calling http://YOURDOMAIN/Umbraco/dialogs/republish.aspx?xml=true
Jeroen
If you are running on Azure Websites, you can FTP to your site location and access individual files. If you go to the site dashboard in the website management portal the FTP information is shown there. That's also where you setup the Deployment/FTP credentials.
That's not ideal either, but it might work until we have a better solution from Umbraco.
Wayne
I have the same challenge!
@Daniel: Did you get any solution?
Hi Jacob,
I went with Waynes solution with using FTP to remove the umbraco.config. Since then I try to do all editing on the staging environment instead of the local environment.
/Daniel
I constantly experience the same issue. Extremely frustrating. We are hosting the site on our own webserver. Republishing nodes or the entire site doesn't help.
http;//YOURDOMAIN/Umbraco/dialogs/republish.aspx?refreshNodes or http;//YOURDOMAIN/Umbraco/dialogs/republish.aspx?previews=true or http;//YOURDOMAIN/Umbraco/dialogs/republish.aspx?xml=true didn't work.
any help highly appreciated.
This is still an issue in Umbraco 7.2.6, it's a bit frustrating having people calling telling me that publishing of the content isn't working. I have to clear the umbraco.config manually and republish the entire website over and over. Is there a way around this?
I am facing the same issue.
Either publish or unpublish a content, in frontend i am viewing the cached data from umbraco.config. In log i am getting the result that the xml has been loaded but the in-memory cache does not serve the correct content. I tried to create a code, on save event to delete the umbraco.config before the saving in order to recreate the file from scratch but still nothing. The in-memory cache does not clear to force reload the content from the file. The only solution is to recycle the application pool, which is not good.
I forgot to mention that i am using v7.3.5
See the following post
https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/74344-problem-with-publish-and-unpublish-with-xml-cache
Technically, what you are doing is load-balancing your site accross two servers. The fact that one of the servers is not an actual, front-end server, but a staging server, does not make a difference: you are running a load-balanced environment.
Because they share the same database, changes made at database level by one server are visible by the other server. However, if load-balancing of Umbraco is not properly configured, everything else--including cache refreshes, etc--is not going to work.
Hence, the result you are seeing: the content is not published anymore in the database (or even, deleted), but still, the other server has it in its in-memory cache and umbraco.config file.
This is expected.
The only way you can get it to work is to setup Umbraco load-balancing. Upgrading to 7.3.0 should greatly simplify this, as LB is practically automatic and uses the database to exchange cache notifications between servers. With 7.2.x, it can be way more complex, expecially when the servers are not in the same network environment.
Making sense?
I use the Kudu console to get directly onto the Azure Web App and delete the umbraco.config file.
Not sure if this needs setting up explicitly but all I do to access Kudu is to add .scm. between the web app name and azurewebsites.net in the Cname record
http://yourappname.scm.azurewebsites.net
More info on Kudu here: https://blogs.msdn.microsoft.com/benjaminperkins/2014/03/24/using-kudu-with-windows-azure-web-sites/
is working on a reply...