We are using micro caching for our website (for 24 hours). We want that whenever user publishes new content, cache should get invalidated. To acheive that we have writtern following trigger.
1. Do we need to do something extra to make this work?
2. We are planning to write a crawler service (scheduler) which we hit our web pages in interval of 10-20 min. so that our pages stay in cache. Is there any better approach to acheive this?
Hm, so a very recent version. And it should be noted that this is a bug in Umbraco, not something you should have to worry about (but we do); without giving a direct answer, what I will say is this. If you can hold out then this should be fixed (hopefully, since it should be fairly straightforward for the devs (I think)) really soon, meaning you can just push your deployment with an upgrade.
It might be a bit much to go to all this bother only to see it fixed next week. But I understand if you're in a fix and need it done, like, yesterday.
Invalidate cache whenever content is updated
Hi All,
We are using micro caching for our website (for 24 hours). We want that whenever user publishes new content, cache should get invalidated. To acheive that we have writtern following trigger.
[Task("987F101F-D06F-48EB-A40B-8E6407276237", TaskTriggers.Hive.PostAddOrUpdateOnUnitComplete, ContinueOnFailure = false)]
public class DocumentPublishedTask : AbstractWebTask
{
public DocumentPublishedTask(IUmbracoApplicationContext applicationContext)
: base(applicationContext)
{
}
public override void Execute(TaskExecutionContext context)
{
HttpRuntime.UnloadAppDomain();
}
protected virtual void OperateOnPostAction(HiveEntityPostActionEventArgs eventArgs)
{
HttpRuntime.UnloadAppDomain();
}
}
But this trigger is not firing. My questions are:
1. Do we need to do something extra to make this work?
2. We are planning to write a crawler service (scheduler) which we hit our web pages in interval of 10-20 min. so that our pages stay in cache. Is there any better approach to acheive this?
Thanks In Advance
Balesh Kumar
Anyone, please help. We are blocked on thi issue
Please state the version of your Umbraco instance.
Thanks for reply Grant. We are using Version 5.0.1.
Balesh
Hm, so a very recent version. And it should be noted that this is a bug in Umbraco, not something you should have to worry about (but we do); without giving a direct answer, what I will say is this. If you can hold out then this should be fixed (hopefully, since it should be fairly straightforward for the devs (I think)) really soon, meaning you can just push your deployment with an upgrade.
It might be a bit much to go to all this bother only to see it fixed next week. But I understand if you're in a fix and need it done, like, yesterday.
Thanks Grant,
I hope Umbraco developer has noticed this. If not, please do that.
Thanks
Balesh Kumar
is working on a reply...