I am using the ContentService to validate the existence of a node (i am aware of its cost, but i need to retrieve it nomatter if it is published, unpublished or trashed).
However i am experiencing some unexpected behaviour. From what i have read in numerous forums posts, the ContentService always access the DB directly (and thus it has a high cost).
Now my problem is that it does not seem to access the DB directly but some kind of cache. Using the ContentService it retrieves the node in question even if it is deleted (even if it is deleted several minutes ago). After recycling the application pool it will return "null", which i expected it to do as soon as the node was deleted.
Steps to reproduce:
Retrieve a node using ContentService.GetById()
=> Returns the node as expected
Delete the node using the Umbraco backoffice
Retrieve the node again using ContentService.GetById()
=> Still returns the node. Looking in the DB the node is deleted.
Is this expected behaviour when using the ContentService?
ContentService returns deleted content
I am using the ContentService to validate the existence of a node (i am aware of its cost, but i need to retrieve it nomatter if it is published, unpublished or trashed).
However i am experiencing some unexpected behaviour. From what i have read in numerous forums posts, the ContentService always access the DB directly (and thus it has a high cost).
Now my problem is that it does not seem to access the DB directly but some kind of cache. Using the ContentService it retrieves the node in question even if it is deleted (even if it is deleted several minutes ago). After recycling the application pool it will return "null", which i expected it to do as soon as the node was deleted.
Steps to reproduce:
Is this expected behaviour when using the ContentService?
Using Umbraco 7.13.1
is working on a reply...