Skip to content

Commit

Permalink
Merge pull request #646 from prasannavl/patch-1
Browse files Browse the repository at this point in the history
Cleanup cache properly
  • Loading branch information
Rycochet authored Aug 13, 2016
2 parents 550b716 + b1668fd commit d2d94f9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions velocity.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,15 @@
store = id && cache[id];

if (store) {
$.each(keys, function(_, key) {
delete store[key];
});
// Cleanup the entire store if no keys are provided.
if (!keys) {
delete cache[id];
}
else {
$.each(keys, function (_, key) {
delete store[key];
});
}
}
};

Expand Down

0 comments on commit d2d94f9

Please sign in to comment.