Skip to content

Commit

Permalink
Add cache buster to all GitHub API calls (#449)
Browse files Browse the repository at this point in the history
This should solve issues like #308 and the issues with cached
API responses after deleting an entry
  • Loading branch information
biilmann authored and Benaiah committed Jun 12, 2017
1 parent 0adb3df commit 546ca59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/backends/github/API.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]) }`);
Expand Down

0 comments on commit 546ca59

Please sign in to comment.