Added some time based cache bursting

This commit is contained in:
Martin Donnelly 2018-10-19 00:34:30 +01:00
parent 2b03a3aa81
commit e2440dcbbc
3 changed files with 6 additions and 4 deletions

View File

@ -11,7 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
const CACHE_VERSION = { 'version': '0.0.908' };
const CACHE_VERSION = { 'version': '0.0.910' };
const PRECACHE = `jubileeData-${CACHE_VERSION.version}`;
const RUNTIME = 'runtime';

View File

@ -4,7 +4,7 @@ const Backbone = require('backbone');
const request = require('request');
const { get } = require('lodash');
// const { reduceNearby } = require('./libs/reducers');
const { toHour } = require('./libs/utils');
const { toHour, hourFloor } = require('./libs/utils');
const TimeFormat = require('hh-mm-ss');
const fecha = require('fecha');
@ -75,7 +75,7 @@ const AgendaModel = Backbone.Model.extend({
'url': `${window.loc}/agenda`,
'method': 'GET',
'qs': {
'w' : hourFloor()
}
}, function(err, res, body) {
if (err)

View File

@ -6,6 +6,7 @@ const { get, isEmpty } = require('lodash');
const { createPanel, addPanel } = require('./libs/panel');
const templates = require('./libs/templates');
const TimeFormat = require('hh-mm-ss');
const { hourFloor } = require('./libs/utils');
const ForecastModel = Backbone.Model.extend({
'defaults': function (obj) {
@ -29,7 +30,8 @@ const ForecastModel = Backbone.Model.extend({
'url': `${window.loc}/forecast`,
'method': 'GET',
'qs': {
'll': ll
'll': ll,
'w' : hourFloor()
}
}, function(err, res, body) {
console.log('statusCode', res.statusCode);