Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.

Commit b901b15

Browse files
Updates the flushall to follow the ASYNC construction as documented in node_redis
1 parent deb107a commit b901b15

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/routes/cache.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ function routes(app) {
1313
const h = new RedisCache(client);
1414

1515
router.get('/clear', (req, res) => {
16-
client.flushall();
17-
res.status(HTTP_OK).json({
18-
message: 'Cache cleared',
19-
status: HTTP_OK
16+
client.flushall('ASYNC', () => {
17+
res.status(HTTP_OK).json({
18+
message: 'Cache cleared',
19+
status: HTTP_OK
20+
});
2021
});
21-
});
22+
}); // clear a unique route
2223

2324
// clear a unique route
2425
router.get('/clear/single/*', (req, res) => {

0 commit comments

Comments
 (0)