After a big of digging I found the code needed to turn off caching. Open up the app.js file and look at the very top. You should see a Ext.Loader.setPath method. Update it to look like this and caching should now be disabled.
Ext.Loader.setPath({ 'Ext': 'touch/src', 'Sample': 'app' }).setConfig({ disableCaching: false });
Um, don't you mean setting disableCaching to false will ENABLE caching? When disableCaching is true...well, it disables caching.
ReplyDeleteIt's a really confusing property. Some of the comments on the property on the sencha docs site said it's named pretty poorly.
ReplyDeleteWhen disableCaching is set to true it still adds the _dc property to all the loaded scripts. When it's set to false the _dc is gone and it no longer caches the script.
It's weird which is why I posted about it.
You can see what I mean by turning on the dev tools in Chrome (osx: cmd+alt+i / win: ctrl+alt+i) and goto the sources tab. Press (osx: cmd+o / win: ctrl+o) and type Bar.js. When disableCaching is false there is no _dc. When it's true you see the _dc property.
You have it backwards. The _dc parameter is added to the URL so that it is unique and therefore not cached. When the _dc parameter is not present, only then will it be cached as the URL will always be the same.
ReplyDeleteThanks for catching that. I'll update the post.
DeleteThanks for this. I was thinking it was Ext.Ajax.
ReplyDelete