Skip to content
This repository has been archived by the owner on May 9, 2018. It is now read-only.

Commit

Permalink
Purge all database cache when destroying. flatiron#149
Browse files Browse the repository at this point in the history
  • Loading branch information
ndrut committed Aug 5, 2013
1 parent 371cf75 commit 6e0ebff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/cradle/database/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ Database.prototype.create = function (callback) {
Database.prototype.destroy = function (callback) {
if (arguments.length > 1) {
throw new(Error)("destroy() doesn't take any additional arguments");
}

}
this.cache.purgeall();
this.query({
method: 'DELETE',
path: '/',
}, callback);
}, callback);
};

//
Expand All @@ -62,4 +62,4 @@ Database.prototype.destroy = function (callback) {
require('./attachments');
require('./changes');
require('./documents');
require('./views');
require('./views');

0 comments on commit 6e0ebff

Please sign in to comment.