0

I am trying to disable the Tridion GUI browser caching for schemas in our Development environment since the changes do not reflect because of CME caching. CTRL+R OR CTRL+F5 does not helps nor does closing and re-opening browser :( The only way is to clear the browser cache everytime which makes the development very slow.

Operations which do not show up immediately:

  1. Change a schema by adding or removing a field, it does not reflect immediately in the component (old ones already created or when creating a new one)
  2. Create a new schema and then try to create a component, the new schema does not shows up in the schema list

To change this behavior, I've set the max-age attributes to "1" for the below in TCM54.config file:

  <cfg:cache implementation="Tridion.ContentManager.Schema" max-age="1" />
  <cfg:cache implementation="Tridion.ContentManager.ListSchemas" max-age="1" />

And did the Tridion service restart and iisreset on the CM servers, but still schema changes are not reflecting.

Ques:

  1. Am I missing any additional setting that needs to be changed?
  2. Also, my assumption is that the max-age attribute is in seconds. Is that correct?
  • Perhaps you could clarify what kind of changes are not showing up? Because the browser cache is only used for the CSS, JavaScript, etc. -- not for the data. It is true that the Schema data is cached in memory, but closing your browser / refreshing it 'correctly' would fix that. – Peter Kjaer May 22 '15 at 8:11
  • I've added scenarios as well to the question. This is a common caching issue is what I've heard (it happens with templates as well sometimes) and hence I wanted to configure the max age for schema to a bare minimum via the config changes in TCM54. But, so far I haven't received any responses to my question :( – Vipin Kothari May 22 '15 at 15:54
1

I got answers to both of my questions from Tridion Support and now things are working as I intended. I see changes immediately after I make changes in the schema and I don't need to update config file or close and reopen the browser for changes to reflect every time. It's a one time change in TCM54. Sharing it if others run into similar issue. Here are the answers to both the questions that I asked:

  1. Max Age attribute is in seconds
  2. For the changes in TCM54.config to reflect, modify the system.config under %TRIDION_HOME%\WebUI\WebRoot\Configuration and increment the modification attribute by 1
0

There is an easier way to achieve what you want. The Tridion GUI already has support for serving versioned files, so that you don't have to worry about the browser cache. You simply have to increment the GUI version, and a fresh version of each file (with a new name) will be served to the browser, and of course all references will also be to the new name. If you are doing this a lot during a development phase you might want to run a script to do the increment. Here's an example snippet of powershell that would do it.

function incrementGuiMod {
    $configFileName = 'C:\Program Files (x86)\Tridion\web\WebUI\WebRoot\Configuration\System.config'
    $conf = [xml](get-content $configFileName)
    $mod = [int]$conf.Configuration.servicemodel.server.modification
    $mod++
    $conf.Configuration.servicemodel.server.modification = "$mod"
    $conf.Save($configFileName)
    "GUI mod is now $mod"
}
set-alias igm incrementGuiMod

With this in your $profile, all you'd need to do would be to type 'igm' each time you needed a fresh gui.

  • I know about the system.config file modification that you have mentioned, but that will reset the whole GUI for all users (which is not desired) and I do not want to change a config file every time I make some change because that sounds crazy. Since there is another configuration in the product which allows this (in TCM54.config) and is a one time change, I want to use the same. system.config change is my last resort option (even later than clearing browser cache). Please let me know if you have suggestions on tcm54 config for schema? – Vipin Kothari May 21 '15 at 19:58
  • Well I hope you are doing your development work on a dedicated system. In any case, you are talking about disabling caching for all users. Why would you want that? – Dominic Cronin May 21 '15 at 20:01
  • And changing the configuration when you want your change to be picked up... that's not crazy, it's how the guide works. – Dominic Cronin May 21 '15 at 20:03
  • I am disabling only in Dev env and for specific item (schemas) not for every item, because we have Dev group which modifies schemas. As I said in my question, I am looking for the setting for TCM54, if you have suggestions on that, please let me know. Whether changing a config file eveytime for a GUI operation (schema save) is a desired experience or not is opinion based :) Although, I am a bit surprised to be honest on the suggestion that when a change is made in GUI (in this case for schema) and it is saved, we will need to modify a config file to see the change being reflected in GUI. – Vipin Kothari May 21 '15 at 20:16
  • Generally, closing your browser and opening it again is generally enough to pick up a schema change. – Dominic Cronin May 21 '15 at 20:19

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.