Simple line of code that returns IPublishedContent:
var cachedNode = umbracoHelper.TypedContent(1234);
My issues is that the code above returns cashed contend whereas there're cases where I would rather want NOT cashed content to be returned.
For example, in integration tests I need to perform testing against NOT cached data only.
One of my ideas was: umbracoContext.InPreviewMode = true, but that didn't work.
Disable caching in umbracoHelper.TypedContent
Hi guys!
Simple line of code that returns IPublishedContent:
My issues is that the code above returns cashed contend whereas there're cases where I would rather want NOT cashed content to be returned. For example, in integration tests I need to perform testing against NOT cached data only.
One of my ideas was:
umbracoContext.InPreviewMode = true
, but that didn't work.Any help on the subject?
Hi Ivan
Try to disable xml cache in /config/umbracoSettings.config:
Another way is to use Content service to work with data from database directly, like this:
Thanks,
Alex
Thanks, Alex! I think it should work with ContentService.
You are welcome, glad to help!!!
/Alex
is working on a reply...