Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an event that retrieves information from Publication Metadata. I would like to cache this information so that I don't need to access the Publication object each time. I see that the ContextVariables allow me to pass information between events. Can I use this for caching? If not, any alternative ways to cache information to re-use?

share|improve this question
up vote 5 down vote accepted

I tend to use a static Dictionary in a config class. I think (at least in 2013+ versions) that this should persist for the lifetime of the parent CMS process (typically core service, but could be publisher etc.). Context variables are probably only persisting for the execution of a (chain of) event(s), so will be wiped between separate actions that trigger new events

share|improve this answer
A static Dictionary is a nice one, I mostly use readonly variables which I set in the constructor, see my ECL Stub Component Event Handler – Bart Koopman Jul 31 '14 at 12:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.