I've been adding caching to a new-ish Umbraco application as part of performance improvement project. As advised in the documentation i've used the Umbraco helper method(s).
However, I've also found some existing code that uses HttpContext.Current.Cache directly which contradicts the following:
"You shouldn't be using HttpRuntime.Cache or HttpContext.Current.Cache directly, you should always be accessing it via the ApplicationContext.ApplicationCache object"
Should i be concerned about this and re-write to use the Umbraco caching implementation or can i happily leave the code alone?
Using Runtime Cache with Umbraco
Hi,
I've been adding caching to a new-ish Umbraco application as part of performance improvement project. As advised in the documentation i've used the Umbraco helper method(s).
https://our.umbraco.org/documentation/reference/cache/updating-cache
However, I've also found some existing code that uses HttpContext.Current.Cache directly which contradicts the following:
"You shouldn't be using HttpRuntime.Cache or HttpContext.Current.Cache directly, you should always be accessing it via the ApplicationContext.ApplicationCache object"
Should i be concerned about this and re-write to use the Umbraco caching implementation or can i happily leave the code alone?
Any thoughts would be appreciated.
Thanks,
Alistair
Hi Alistair
Can you share with our community how did you do a caching and what pitfalls, maybe?
Alex
is working on a reply...