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.

  • 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? – Dominic Cronin Nov 18 '15 at 15:30
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).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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