@golemio/playgrounds 1.1.9-dev.1288390103 → 1.1.9

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.
@@ -8,9 +8,10 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.playgroundsRouter = exports.PlaygroundsRouter = void 0;
10
10
  const output_gateway_1 = require("@golemio/core/dist/output-gateway");
11
- const redis_1 = require("@golemio/core/dist/output-gateway/redis");
12
11
  const express_1 = require("@golemio/core/dist/shared/express");
13
12
  const PlaygroundsModel_1 = require("./models/PlaygroundsModel");
13
+ const CACHE_MAX_AGE = 12 * 60 * 60;
14
+ const CACHE_STALE_WHILE_REVALIDATE = 60 * 60;
14
15
  class PlaygroundsRouter extends output_gateway_1.GeoJsonRouter {
15
16
  constructor() {
16
17
  super(new PlaygroundsModel_1.PlaygroundsModel());
@@ -25,8 +26,8 @@ class PlaygroundsRouter extends output_gateway_1.GeoJsonRouter {
25
26
  next(err);
26
27
  });
27
28
  };
28
- this.initRoutes();
29
- this.router.get("/properties", (0, redis_1.useCacheMiddleware)(), this.GetProperties);
29
+ this.initRoutes({ maxAge: CACHE_MAX_AGE, staleWhileRevalidate: CACHE_STALE_WHILE_REVALIDATE });
30
+ this.router.get("/properties", this.cacheHeaderMiddleware.getMiddleware(CACHE_MAX_AGE, CACHE_STALE_WHILE_REVALIDATE), this.GetProperties);
30
31
  }
31
32
  }
32
33
  exports.PlaygroundsRouter = PlaygroundsRouter;
@@ -1 +1 @@
1
- {"version":3,"file":"PlaygroundsRouter.js","sourceRoot":"","sources":["../../src/output-gateway/PlaygroundsRouter.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,sEAAkE;AAClE,mEAA6E;AAC7E,+DAA4F;AAC5F,gEAA6D;AAE7D,MAAa,iBAAkB,SAAQ,8BAAa;IAGhD;QACI,KAAK,CAAC,IAAI,mCAAgB,EAAE,CAAC,CAAC;QAH3B,WAAM,GAAW,IAAA,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AAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC/B,CAAC,CAAC;iBACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;gBACX,IAAI,CAAC,GAAG,CAAC,CAAC;YACd,CAAC,CAAC,CAAC;QACX,CAAC,CAAC;QAjBE,IAAI,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,CAAC,CAAC;QAC/F,IAAI,CAAC,MAAM,CAAC,GAAG,CACX,aAAa,EACb,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,aAAa,EAAE,4BAA4B,CAAC,EACrF,IAAI,CAAC,aAAa,CACrB,CAAC;IACN,CAAC;CAYJ;AAvBD,8CAuBC;AAED,MAAM,iBAAiB,GAAW,IAAI,iBAAiB,EAAE,CAAC,MAAM,CAAC;AAExD,8CAAiB"}
package/docs/openapi.yaml CHANGED
@@ -77,7 +77,12 @@ paths:
77
77
  responses:
78
78
  "200":
79
79
  description: OK
80
- headers: {}
80
+ headers:
81
+ Cache-Control:
82
+ description: Cache control directive for caching proxies
83
+ schema:
84
+ type: string
85
+ example: public, s-maxage=43200, stale-while-revalidate=3600
81
86
  content:
82
87
  application/json; charset=utf-8:
83
88
  schema:
@@ -134,7 +139,12 @@ paths:
134
139
  responses:
135
140
  "200":
136
141
  description: OK
137
- headers: {}
142
+ headers:
143
+ Cache-Control:
144
+ description: Cache control directive for caching proxies
145
+ schema:
146
+ type: string
147
+ example: public, s-maxage=43200, stale-while-revalidate=3600
138
148
  content:
139
149
  application/json; charset=utf-8:
140
150
  schema:
@@ -182,7 +192,7 @@ paths:
182
192
  error_message: Not Found
183
193
  error_status: 404
184
194
 
185
- /playgrounds/properties:
195
+ /v2/playgrounds/properties:
186
196
  get:
187
197
  summary: GET All Playgrounds Properties
188
198
  operationId: GETAllPlaygroundsProperties
@@ -192,7 +202,12 @@ paths:
192
202
  responses:
193
203
  "200":
194
204
  description: OK
195
- headers: {}
205
+ headers:
206
+ Cache-Control:
207
+ description: Cache control directive for caching proxies
208
+ schema:
209
+ type: string
210
+ example: public, s-maxage=43200, stale-while-revalidate=3600
196
211
  content:
197
212
  application/json; charset=utf-8:
198
213
  schema:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/playgrounds",
3
- "version": "1.1.9-dev.1288390103",
3
+ "version": "1.1.9",
4
4
  "description": "Golemio Playgrounds Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -33,7 +33,7 @@
33
33
  "@commitlint/config-conventional": "^11.0.0",
34
34
  "@golemio/city-districts": "1.2.10",
35
35
  "@golemio/cli": "1.5.0",
36
- "@golemio/core": "1.10.0",
36
+ "@golemio/core": "1.10.3",
37
37
  "@golemio/db-common": "1.1.4",
38
38
  "@golemio/eslint-config": "1.1.2",
39
39
  "@types/chai": "4.2.3",