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:
parent
0adb3df4ae
commit
546ca5917e
@ -44,7 +44,8 @@ export default class API {
|
|||||||
}
|
}
|
||||||
|
|
||||||
urlFor(path, options) {
|
urlFor(path, options) {
|
||||||
const params = [];
|
const cacheBuster = new Date().getTime();
|
||||||
|
const params = [`ts=${cacheBuster}`];
|
||||||
if (options.params) {
|
if (options.params) {
|
||||||
for (const key in options.params) {
|
for (const key in options.params) {
|
||||||
params.push(`${ key }=${ encodeURIComponent(options.params[key]) }`);
|
params.push(`${ key }=${ encodeURIComponent(options.params[key]) }`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user