After deleting a node with the API I am using umbraco.library.RefreshContent() to refresh the cache, but RefreshContent takes about 10 seconds to refresh the cache. Is there another way to refresh the cache? or just to remove the deleted node from the cache?
You shouldn't need to call "umbraco.library.RefreshContent()" to refresh the content. That is an old method. When you delete the content node using the umbraco content service it should refresh the cache automatically for you.
Alternatively you could unpublish the node instead and then delete and may speed things up for you.
If I don't call "umbraco.library.RefreshContent()", the node isn't removed from from the cache :-/ I have tried to unpublish before I delete the node, but it is still not removed from the cache.
Slow refresh of cache after deleting a node
Hi
After deleting a node with the API I am using umbraco.library.RefreshContent() to refresh the cache, but RefreshContent takes about 10 seconds to refresh the cache. Is there another way to refresh the cache? or just to remove the deleted node from the cache?
Thanks very much in advance :-)
Hey
You shouldn't need to call "umbraco.library.RefreshContent()" to refresh the content. That is an old method. When you delete the content node using the umbraco content service it should refresh the cache automatically for you.
Alternatively you could unpublish the node instead and then delete and may speed things up for you.
Hi nick
Thanks very much for your reply!
If I don't call "umbraco.library.RefreshContent()", the node isn't removed from from the cache :-/ I have tried to unpublish before I delete the node, but it is still not removed from the cache.
Hi Prn
I'm sure that you don't need to republish all cache after deletion of one node.
Try to unpublish the node before deletion with "UnPublish" method:
Thanks,
Alex
Hi Alex
It performe much better :-)
Thanks very much !
Glad to help you! Have a great evening.
is working on a reply...