I have been attempting to save an object on the Umbraco request cache as the same object is accessed several times per request from different services.
I can't find much documentation on the request cache itself but my understand is that the object is cached for the current users http request and then discarded.
Using the following code however the callback function is run every time during the request and the object does not apear to get cached at all.
No difference when I change to the above, still drops into tha callback method every time.
Any other suggestions anyone? The Runtime cache is working as expected for other things I just wanted to use a per request cche for the actual user rather than Timed.
I just remembered something. Some versions of Umbraco had a issue with Request cache. I know 7.3.8 has this issue. And I believe one of the 7.4.x has it too.
Umbraco request cache
Hi all.
I have been attempting to save an object on the Umbraco request cache as the same object is accessed several times per request from different services.
I can't find much documentation on the request cache itself but my understand is that the object is cached for the current users http request and then discarded.
Using the following code however the callback function is run every time during the request and the object does not apear to get cached at all.
Any help understanding this is appreciated.
Thanks
Carl
Hi Carl,
This code seems okay to me. But just to be sure.
Can you use this :
That is how we use it.
Dave
Hi Dave,
I would need to cast to ensure stop errors. but I'll give it a go.
No difference when I change to the above, still drops into tha callback method every time.
Any other suggestions anyone? The Runtime cache is working as expected for other things I just wanted to use a per request cche for the actual user rather than Timed.
Thanks
Hi Carl,
I just remembered something. Some versions of Umbraco had a issue with Request cache. I know 7.3.8 has this issue. And I believe one of the 7.4.x has it too.
See this issue : http://issues.umbraco.org/issue/U4-8027
If you are running on 7.3.8 see the last comment from Jeroen Breuer on how we tackled the issue.
Dave
is working on a reply...