1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +00:00

purge cache when local changes happen

This commit is contained in:
Kyle Spearrin
2016-09-16 23:52:50 -04:00
parent ac4d5836b2
commit 69ea468716
2 changed files with 19 additions and 1 deletions

View File

@@ -118,6 +118,8 @@ function initFolderService() {
throw 'callback function required';
}
var self = this;
userService.getUserId(function (userId) {
var foldersKey = 'folders_' + userId;
@@ -139,6 +141,7 @@ function initFolderService() {
obj[foldersKey] = folders;
chrome.storage.local.set(obj, function () {
self.decryptedFolderCache = null;
callback();
});
});
@@ -150,10 +153,13 @@ function initFolderService() {
throw 'callback function required';
}
var self = this;
userService.getUserId(function (userId) {
var obj = {};
obj['folders_' + userId] = folders;
chrome.storage.local.set(obj, function () {
self.decryptedFolderCache = null;
callback();
});
});
@@ -164,6 +170,8 @@ function initFolderService() {
throw 'callback function required';
}
var self = this;
userService.getUserId(function (userId) {
var foldersKey = 'folders_' + userId;
@@ -191,6 +199,7 @@ function initFolderService() {
obj[foldersKey] = folders;
chrome.storage.local.set(obj, function () {
self.decryptedFolderCache = null;
callback();
});
});