1

We are using Tridion's config file and reading out the parameters from this config file into the .NET code. Based on these parameter values, the publish action is performed.

But as Custom resolver calls each child component present in it during publishing, these parameters are also read for every publish.

So, is there a way to cache these parameters or config file in the application?

I have tried to use Application Cache but the cache is not set.

cache.Set("filecontents", fileContents, policy); 

Cache is null.

Is there any way to cache or maintain Tridion Application cache. So that this file is read only once for IIS restart.

1
  • Are you using Tridion's own config file? Have you also considered putting your data in a component/tbb/application data?? It will help people to answer this if you can expand a bit on your problem. What have you considered/tried, and why didn't it work? Nov 18, 2015 at 15:30

1 Answer 1

2

How are you loading and storing the configuration? It might help to have a static configuration class, which loads the config the first time it is accessed and then 'caches' it for the application lifetime. To be honest though, I am not sure what the application lifetime is in this case - I would hope that its related to the publisher service process, and not just an individual publish action.

Note that I would not use the Tridion.ContentManager.config file to store custom config - use your own config file, or even better load it from a configuration component in the CMS (this means you only have one config place on outscaled environments, and can easy move configuration between environments).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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