@pgpmjs/server-utils 3.4.2 → 3.4.3

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.
package/esm/lru.js CHANGED
@@ -4,10 +4,11 @@ const log = new Logger('pg-cache');
4
4
  const ONE_HOUR_IN_MS = 1000 * 60 * 60;
5
5
  const ONE_DAY = ONE_HOUR_IN_MS * 24;
6
6
  const ONE_YEAR = ONE_DAY * 366;
7
+ export const SVC_CACHE_TTL_MS = ONE_YEAR;
7
8
  // --- Service Cache ---
8
9
  export const svcCache = new LRUCache({
9
10
  max: 25,
10
- ttl: ONE_YEAR,
11
+ ttl: SVC_CACHE_TTL_MS,
11
12
  updateAgeOnGet: true,
12
13
  dispose: (_, key) => {
13
14
  log.debug(`Disposing service[${key}]`);
package/lru.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  import { LRUCache } from 'lru-cache';
2
+ export declare const SVC_CACHE_TTL_MS: number;
2
3
  export declare const svcCache: LRUCache<string, any, unknown>;
package/lru.js CHANGED
@@ -1,16 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.svcCache = void 0;
3
+ exports.svcCache = exports.SVC_CACHE_TTL_MS = void 0;
4
4
  const logger_1 = require("@pgpmjs/logger");
5
5
  const lru_cache_1 = require("lru-cache");
6
6
  const log = new logger_1.Logger('pg-cache');
7
7
  const ONE_HOUR_IN_MS = 1000 * 60 * 60;
8
8
  const ONE_DAY = ONE_HOUR_IN_MS * 24;
9
9
  const ONE_YEAR = ONE_DAY * 366;
10
+ exports.SVC_CACHE_TTL_MS = ONE_YEAR;
10
11
  // --- Service Cache ---
11
12
  exports.svcCache = new lru_cache_1.LRUCache({
12
13
  max: 25,
13
- ttl: ONE_YEAR,
14
+ ttl: exports.SVC_CACHE_TTL_MS,
14
15
  updateAgeOnGet: true,
15
16
  dispose: (_, key) => {
16
17
  log.debug(`Disposing service[${key}]`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pgpmjs/server-utils",
3
- "version": "3.4.2",
3
+ "version": "3.4.3",
4
4
  "author": "Constructive <developers@constructive.io>",
5
5
  "description": "PGPM server utils",
6
6
  "main": "index.js",
@@ -33,7 +33,7 @@
33
33
  "@pgpmjs/types": "^2.19.2",
34
34
  "cors": "^2.8.6",
35
35
  "express": "^5.2.1",
36
- "lru-cache": "^11.2.6"
36
+ "lru-cache": "^11.2.7"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/cors": "^2.8.17",
@@ -49,5 +49,5 @@
49
49
  "pgpmjs",
50
50
  "helpers"
51
51
  ],
52
- "gitHead": "4fd2c9be786ad9ae2213453276a69723435d5315"
52
+ "gitHead": "21fd7c2c30663548cf15aa448c1935ab56e5497d"
53
53
  }