cityindex / kibana

Kibana 3
http://www.elasticsearch.org/overview/kibana/
Other
0 stars 0 forks source link

Implement better cache busting for new releases #11

Closed mrdavidlaing closed 10 years ago

mrdavidlaing commented 10 years ago

@mrdavidlaing, we should discuss putting kibana's assets in a versioned directory or using a cache-busting query param to avoid https://www.flowdock.com/app/cityindexlabs/cityindex-logsearch-io-support/inbox/341753 dpb587 17:48 @mrdavidlaing, we should discuss putting kibana's assets in a versioned directory or using a cache-busting query param to avoid https://www.flowdock.com/app/cityindexlabs/cityindex-logsearch-io-support/inbox/341753 dpb587 17:48 perhaps angular has a built-in way to do that which we can embed into our config.js? /cc @ryanholder dpb587 17:49 aka, i don't know where to create such an issue ryanholder 18:08 @dpb587, if I remember correctly Kibana uses RequireJS for assets and the issue might lie there. This is the first thing on Google regarding cache busting for RequireJS - http://requirejs.org/docs/api.html#config-urlArgs dpb587 18:12 For our kibana deploy, we should consider renaming /app/ to /app-$BUILD_NUMBER, updating index.html, and set long-term caching for that directory. The require.js urlArgs is a hacky approach and avoids any sort of useful caching.

mrdavidlaing commented 10 years ago

screen shot 2014-06-09 at 18 47 13

dpb587 commented 10 years ago

I misspoke when I said urlArgs was a hacky approach - that was based solely on the docs example of using it with a dynamic (new Date()).getTime(). Sorry for that confusion and glad you PR'd the better implementation.

mrdavidlaing commented 10 years ago

I'm still confused why urlArgs was committed upstream commented out - want to know if that was intentional before accepting this as a fix - https://github.com/elasticsearch/kibana/issues/1291

mrdavidlaing commented 10 years ago

If I only had a :dollar: for every time I've been bitten by caching issues...

ghoranyi commented 10 years ago

Actually I am trying to upgrade from 3.0.1 to 3.1.0 and I still have caching issues. I still receive old resources, served from browser cache, so I am not sure, that is issue should be closed. image

mrdavidlaing commented 10 years ago

@ghoranyi - have you applied the urlArgs patch?

You should be seeing url's like this:

image

ghoranyi commented 10 years ago

@mrdavidlaing No I didn't, but I will do so. I just used the version available at elasticsearch.org. Thank you for your quick response.

mrdavidlaing commented 10 years ago

Please - let us know how you get on.

If our patch works for you; would you consider creating an upstream PR to get it applied to elasticsearch/kibana ?

ghoranyi commented 10 years ago

@mrdavidlaing Yes it worked, indeed. I will create the upstream PR as soon as I can (I have some other pending changes, which I am currently discussing with my employer - licensing, etc...) Thank you for the help again.

mrdavidlaing commented 10 years ago

Great news - glad our fix helped you.