Add cache buster to all GitHub API calls (#449)

This should solve issues like #308 and the issues with cached
API responses after deleting an entry
This commit is contained in:
Mathias Biilmann 2017-06-12 13:01:53 -07:00 committed by Benaiah Mischenko
parent 0adb3df4ae
commit 546ca5917e

View File

@ -44,7 +44,8 @@ export default class API {
}
urlFor(path, options) {
const params = [];
const cacheBuster = new Date().getTime();
const params = [`ts=${cacheBuster}`];
if (options.params) {
for (const key in options.params) {
params.push(`${ key }=${ encodeURIComponent(options.params[key]) }`);