@seip/blue-bird 0.9.6 → 0.9.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/core/cache.js +3 -2
  2. package/package.json +1 -1
package/core/cache.js CHANGED
@@ -45,7 +45,7 @@ async function initRedis() {
45
45
  }
46
46
  }
47
47
 
48
- initRedis().catch(() => {});
48
+ initRedis().catch(() => { });
49
49
 
50
50
  setInterval(() => {
51
51
  const now = Date.now();
@@ -70,7 +70,7 @@ class Cache {
70
70
  const key = req.originalUrl;
71
71
 
72
72
  if (redisHost && !redisClient) {
73
- await initRedis().catch(() => {});
73
+ await initRedis().catch(() => { });
74
74
  }
75
75
 
76
76
  if (isRedisConnected && redisClient) {
@@ -79,6 +79,7 @@ class Cache {
79
79
  if (cachedData) {
80
80
  const cached = JSON.parse(cachedData);
81
81
  if (cached.type === "json") {
82
+ res.set("X-Blue-Bird-Cache", "HIT");
82
83
  return res.json(cached.data);
83
84
  } else {
84
85
  res.type("text/html");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seip/blue-bird",
3
- "version": "0.9.6",
3
+ "version": "0.9.7",
4
4
  "description": "Express opinionated API framework with built-in JWT auth, validation, and caching",
5
5
  "type": "module",
6
6
  "types": "core/index.d.ts",