When I create a new page template it doesn’t seem to be available in Tridion straight away. That is, if I go to a page I can’t assign my new page template straight away. It does become available after a while but I wondered why it doesn’t show immediately.
3 Answers
I never noticed it with Templates. I definitely see this all the time with Schema changes, and the reason is the aggressive Caching strategy of the CME.
Pressing F5 while I have a component loaded will normally fix it for me. Maybe you could try doing the same -
- Open a page
- check the list of templates (template not there)
- press F5
- check the list of templates again (template should be there).
If this doesn't work, go drastic - clear the browser cache.
-
Can we force that the schema/template/item cache is emptied at all user's browsers? Something like the modification node in the WebRoots System.config? (see this question stackoverflow.com/questions/14654830/…)– Jan HFeb 27, 2013 at 21:46
-
Yes, changing that same modification attribute will invalidate pretty much anything in cache for clients.– Nuno Linhares ♦Feb 27, 2013 at 21:54
-
@nuno, I had a discussion about that mod, attribute, and I seem to recall that we concluded that it does not reset the cached items in the client browser, only the resources like CSS and JS which have that mod number in their URLs. Are you certain it clears lists like Templates and Schemas? Feb 27, 2013 at 22:05
-
Hmm. Good point Chris, this is model data, not a resource, so it's actually not really cached by the browser per se, it's cached by the CME webapp. Recycling the app pool - though very drastic - will probably do it. Or just press F5– Nuno Linhares ♦Feb 27, 2013 at 22:21
I see this a problem a lot for both Schema and Template lists. When Ctrl-F5 doesn't work, I find closing all windows of the browser and reopening the CME tends to solve the problem.
Lists like that are cached in memory for all users for an hour by default. That makes sense because you generally don't create Schemas and Templates all the time that need to be used immediately -- whereas the lists themselves are used much more frequently by a lot of users.
If you just created a Schema or Template and want to use it, you can press F5 in the window with the list and it will refresh it (e.g. just the Component editing screen, or the Insert Component Presentation window). Note that it has to be the F5 key, not CTRL+R, your browser's Refresh button, or other ways that you might be used to (since the clicking of those cannot be detected from JavaScript).
You don't have to close down all CME windows, although that will certainly also do the trick.
If you want to lower the cache duration for a specific list, you can change the @max-age
attribute for the appropriate list in the TCM54.config
file of the CME Model (in this case the commented out cfg:cache element which has an @implementation
value of Tridion.ContentManager.ListComponentTemplates
).
However, this will apply to all users and might impact the performance of your server -- so I would not recommend it unless this is a very frequent problem that is experienced by a lot of your users.
-
Thanks Peter - TrEx saved my butt yet again! It would be good to have a recommended set of values for a DEV box where this has caused me endless problems. Mar 7, 2013 at 22:34
-
1On a development machine, you can set it as low as you want - 1 second if you wish. It will just request the list every time, but that won't matter if there's only you or a handful of people using the CME. Mar 8, 2013 at 9:03