|
|
Rank: Newbie
Joined: 2/19/2008 Posts: 7
|
Hi,
I have 2 umbraco sites connected to a single db. When updates are made on one they don't appear on the other.
Is there a standard way of clearing the cache on the site that is displaying the older content?
I cannot use the load balancing feature in the umbracoConfig.xml because one of the sites cannot be pinged as it sits on an intranet.
I've tried using "HttpRuntime.UnloadAppDomain()" and "umbraco.library.RePublishNodesDotNet(-1)" within a usercontrol, but that does not work either.
Has anyone experienced this issue before?
Thanks in advance, Alex.
|
|
Rank: Newbie
Joined: 2/19/2008 Posts: 7
|
Sorry my mistake, Quote:I cannot use the load balancing feature in the umbracoConfig.xml because one of the sites cannot be pinged as it sits on an intranet.
I meant to say the "umbracoSettings.xml" not the "umbracoConfig.xml" file. Alex.
|
|
 Rank: Umbracoholic
Joined: 9/8/2006 Posts: 1,698 Location: KY, USA
|
Hi, Alex, I'm afraid what you're trying to do is impossible. You not only need to share the database, but also the filesystem. Also, they servers must be able to communicate to one another via TCP/IP to keep each other informed of changes. You can read more about it here: http://forum.umbraco.org/18691cheers, doug.
MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
|
|
Rank: Newbie
Joined: 2/19/2008 Posts: 7
|
Hi Douglas, Thanks for the reply. I am currently replicating the filesystem via an ftp service which is scheduled to run at a certain time to keep any media files synchronised with the latest changes. This works ok. What I need is some way of programmatically clearing the content cache and pulling in the new content when the site with the older content is started. I've managed to setup an actionhandler on the publish event, that updates a db table. That table is then read when the site with the older content is started. However none of the standard ways of clearing the cache using a Usercontrol seem to work. I've also tried the ASP.NET Cache Manager (see: http://forum.umbraco.org/reply?post=21222), but this has no effect either. Any ideas? Thanks, Alex.
|
|
Rank: Newbie
Joined: 2/19/2008 Posts: 7
|
Hi,
If I manually recyle the appDomain by touching the web.config file this clears the cache and updates the site with the latest content. The programmatic way to do this is by using "HttpRuntime.UnloadAppDomain()" but I'm not sure how to get this to work in a user control within umbraco.
Any ideas appreciated.
Thanks, Alex.
|
|
Rank: Newbie
Joined: 2/19/2008 Posts: 7
|
Ok, managed to find a solution to this problem.
Adding the following to a user control will work:
umbraco.library.PublishSingleNode(Id); HttpRuntime.UnloadAppDomain();
With the Id being the value of the node being published on the other website.
|
|
|
Guest |