Revert "clear localstore on version modification"

This reverts commit 5eb10e67ad.
pull/3361/head
Pablo Alonso Garcia 10 years ago
parent 3313cc30de
commit 6d2fae4884

@ -113,7 +113,6 @@
// Set assets url for static assets in our app
var config = grunt.template.process("cdb.config.set('assets_url', '<%= env.http_path_prefix %>/assets/<%= pkg.version %>');");
config += grunt.template.process("\nconsole.log('cartodbui v<%= pkg.version %> sha1: <%= gitrev %>');");
config += grunt.template.process("\nCARTODB_UI_VERSION='<%= pkg.version %>';");
grunt.file.write("lib/build/app_config.js", config);
});

@ -95,17 +95,6 @@ cdb.config.prefixUrlPathname = function() {
throw new Error("cachedSync needs a namespace as argument");
}
// check for free space
try {
localStorage.setItem("WRITE_TEST", CARTODB_UI_VERSION);
if (CARTODB_UI_VERSION !== localStorage.getItem("WRITE_TEST")) {
throw new Error("failed");
}
} catch (e) {
cdb.log.debug("datastore is full, not using cached sync");
return Backbone.sync;
}
var surrogateKey = namespace;
var session = window.user_data && window.user_data.username;
// no user session, no cache
@ -284,16 +273,3 @@ function applyPatchNewVisualizationUrl() {
}
// clears localstore if the cartodb frontend version has changed
function clearLocalstore() {
if (CARTODB_UI_VERSION !== localStorage.getItem("CARTODB_UI_VERSION")) {
localStorage.clear();
localStorage.setItem("CARTODB_UI_VERSION", CARTODB_UI_VERSION);
}
}
$(function() {
clearLocalstore();
});

Loading…
Cancel
Save