Adding Caching Adapter, allows caching of _Role and _User queries (fixes #168) (#1664)

* Adding Caching Adapter, allows caching of _Role and _User queries.
This commit is contained in:
Blayne Chard
2016-05-18 12:12:30 +12:00
parent 5d887e18f0
commit 8c09c3dae1
18 changed files with 526 additions and 134 deletions

View File

@@ -1,5 +1,5 @@
// testing-routes.js
import cache from './cache';
import AppCache from './cache';
import * as middlewares from './middlewares';
import { ParseServer } from './index';
import { Parse } from 'parse/node';
@@ -47,7 +47,7 @@ function dropApp(req, res) {
return res.status(401).send({ "error": "unauthorized" });
}
return req.config.database.deleteEverything().then(() => {
cache.apps.remove(req.config.applicationId);
AppCache.del(req.config.applicationId);
res.status(200).send({});
});
}