Some caching fixes
This commit is contained in:
parent
c30d72d37c
commit
9fe1607429
@ -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.889' };
|
||||
const CACHE_VERSION = { 'version': '0.0.890' };
|
||||
const PRECACHE = `jubileeData-${CACHE_VERSION.version}`;
|
||||
const RUNTIME = 'runtime';
|
||||
|
||||
|
@ -53,9 +53,9 @@ const LocationModel = Backbone.Model.extend({
|
||||
const location = { 'latitude': position.coords.latitude, 'longitude': position.coords.longitude, 'timestamp': position.timestamp };
|
||||
|
||||
const now = new Date();
|
||||
if (now - this.throttler > 30000) {
|
||||
if (now.getTime() - this.throttler > 30000) {
|
||||
this.processPosition(location);
|
||||
this.throttler = now + 1000;
|
||||
this.throttler = now.getTime() + 1000;
|
||||
} else {
|
||||
console.log('Throttling location update...');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user