@paroicms/server-text-cache-system 1.12.1 → 1.13.1
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/dist/db-init/db-init.d.ts +2 -2
- package/dist/db-init/db-init.js +2 -5
- package/dist/db-init/db-init.js.map +1 -1
- package/dist/db-init/ddl-migration.d.ts +2 -2
- package/dist/db-init/ddl-migration.js +4 -4
- package/dist/db-init/ddl-migration.js.map +1 -1
- package/dist/db-init/entities/PaTextCache.entity.d.ts +1 -1
- package/dist/db-init/entities/PaTextCache.entity.js +1 -41
- package/dist/db-init/entities/PaTextCache.entity.js.map +1 -1
- package/dist/db-init/entities/PaTextCacheDependency.entity.d.ts +1 -1
- package/dist/db-init/entities/PaTextCacheDependency.entity.js +1 -26
- package/dist/db-init/entities/PaTextCacheDependency.entity.js.map +1 -1
- package/dist/db-init/entities/PaTextCacheScheduledInvalidation.entity.d.ts +1 -1
- package/dist/db-init/entities/PaTextCacheScheduledInvalidation.entity.js +1 -36
- package/dist/db-init/entities/PaTextCacheScheduledInvalidation.entity.js.map +1 -1
- package/dist/internal/cache-system-context.d.ts +2 -2
- package/dist/internal/queries.d.ts +4 -3
- package/dist/internal/queries.js +39 -72
- package/dist/internal/queries.js.map +1 -1
- package/dist/internal/scheduled-invalidation-queries.d.ts +4 -4
- package/dist/internal/scheduled-invalidation-queries.js +16 -35
- package/dist/internal/scheduled-invalidation-queries.js.map +1 -1
- package/package.json +7 -6
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type AppLogger } from "@paroicms/internal-server-lib";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Knex } from "knex";
|
|
3
3
|
export declare function createOrOpenConnection({ sqliteFile, appVersion, logger, }: {
|
|
4
4
|
sqliteFile: string;
|
|
5
5
|
appVersion: string;
|
|
6
6
|
logger: AppLogger;
|
|
7
7
|
}): Promise<{
|
|
8
|
-
cn:
|
|
8
|
+
cn: Knex<any, any[]>;
|
|
9
9
|
logNextQuery: (count?: number) => void;
|
|
10
10
|
isCleared: boolean;
|
|
11
11
|
}>;
|
package/dist/db-init/db-init.js
CHANGED
|
@@ -3,18 +3,15 @@ import { join } from "node:path";
|
|
|
3
3
|
import { packageDir } from "../constants.js";
|
|
4
4
|
import { clearCacheValues } from "../internal/queries.js";
|
|
5
5
|
import { currentDbSchemaVersion, dbSchemaName, migrateTextCacheDb } from "./ddl-migration.js";
|
|
6
|
-
import { PaTextCacheEntity } from "./entities/PaTextCache.entity.js";
|
|
7
|
-
import { PaTextCacheDependencyEntity } from "./entities/PaTextCacheDependency.entity.js";
|
|
8
6
|
export async function createOrOpenConnection({ sqliteFile, appVersion, logger, }) {
|
|
9
|
-
const { logNextQuery,
|
|
7
|
+
const { logNextQuery, knexLogger } = createSqlLogger({ logger, dbSchemaName });
|
|
10
8
|
const { cn, isNewDatabase, migrationReport } = await createOrOpenSqliteConnection({
|
|
11
9
|
canCreate: true,
|
|
12
10
|
dbSchemaName,
|
|
13
11
|
sqliteFile,
|
|
14
12
|
ddlFile: join(packageDir, "ddl", "text-cache.ddl.sql"),
|
|
15
13
|
migrateDb,
|
|
16
|
-
|
|
17
|
-
typeOrmLogger,
|
|
14
|
+
knexLogger,
|
|
18
15
|
logger,
|
|
19
16
|
});
|
|
20
17
|
let isCleared = isNewDatabase || migrationReport.migrated;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db-init.js","sourceRoot":"","sources":["../../src/db-init/db-init.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,4BAA4B,EAC5B,eAAe,EACf,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"db-init.js","sourceRoot":"","sources":["../../src/db-init/db-init.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,4BAA4B,EAC5B,eAAe,EACf,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,+BAA+B,CAAC;A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AAO,UAAU,EAAE,CACzF,CAAC;QACJ,CAAC;IACH,CAAC;IAED,KAAK,UAAU,SAAS,CAAC,EAAQ;QAC/B,MAAM,SAAS,GAAG,MAAM,0BAA0B,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC;QACzE,IAAI,SAAS,KAAK,sBAAsB,EAAE,CAAC;YACzC,OAAO;gBACL,QAAQ,EAAE,KAAK;gBACf,aAAa,EAAE,SAAS;aACzB,CAAC;QACJ,CAAC;QACD,MAAM,kBAAkB,CAAC,EAAE,EAAE;YAC3B,WAAW,EAAE,SAAS;YACtB,MAAM;SACP,CAAC,CAAC;QACH,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,SAAS;YACtB,aAAa,EAAE,sBAAsB;SACtC,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;AACzC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { AppLogger } from "@paroicms/public-server-lib";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Knex } from "knex";
|
|
3
3
|
export declare const dbSchemaName = "text-cache";
|
|
4
4
|
export declare const currentDbSchemaVersion = 3;
|
|
5
|
-
export declare function migrateTextCacheDb(cn:
|
|
5
|
+
export declare function migrateTextCacheDb(cn: Knex, { fromVersion, logger }: {
|
|
6
6
|
fromVersion: number;
|
|
7
7
|
logger: AppLogger;
|
|
8
8
|
}): Promise<void>;
|
|
@@ -7,10 +7,10 @@ export async function migrateTextCacheDb(cn, { fromVersion, logger }) {
|
|
|
7
7
|
const toVersion = currentDbSchemaVersion;
|
|
8
8
|
let currentVersion = fromVersion;
|
|
9
9
|
if (currentVersion <= 2) {
|
|
10
|
-
await cn.
|
|
11
|
-
await cn.
|
|
12
|
-
await cn.
|
|
13
|
-
await cn.
|
|
10
|
+
await cn.schema.dropTableIfExists("PaTextCacheScheduledInvalidation");
|
|
11
|
+
await cn.schema.raw("drop index if exists PaTextCacheDependency_depK_index");
|
|
12
|
+
await cn.schema.dropTableIfExists("PaTextCacheDependency");
|
|
13
|
+
await cn.schema.dropTableIfExists("PaTextCache");
|
|
14
14
|
}
|
|
15
15
|
// We don't care losing cache data
|
|
16
16
|
if (currentVersion < toVersion) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ddl-migration.js","sourceRoot":"","sources":["../../src/db-init/ddl-migration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAEvF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC;AACzC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAExC,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,
|
|
1
|
+
{"version":3,"file":"ddl-migration.js","sourceRoot":"","sources":["../../src/db-init/ddl-migration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAEvF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC;AACzC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAExC,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,EAAQ,EACR,EAAE,WAAW,EAAE,MAAM,EAA8C;IAEnE,MAAM,SAAS,GAAG,sBAAsB,CAAC;IACzC,IAAI,cAAc,GAAG,WAAW,CAAC;IAEjC,IAAI,cAAc,IAAI,CAAC,EAAE,CAAC;QACxB,MAAM,EAAE,CAAC,MAAM,CAAC,iBAAiB,CAAC,kCAAkC,CAAC,CAAC;QACtE,MAAM,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC;QAC7E,MAAM,EAAE,CAAC,MAAM,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,CAAC;QAC3D,MAAM,EAAE,CAAC,MAAM,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC;IACnD,CAAC;IAED,kCAAkC;IAClC,IAAI,cAAc,GAAG,SAAS,EAAE,CAAC;QAC/B,MAAM,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;QAC7C,MAAM,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC;QACpE,cAAc,GAAG,MAAM,0BAA0B,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CACb,cAAc,YAAY,wBAAwB,SAAS,cAAc,cAAc,GAAG,CAC3F,CAAC;IACJ,CAAC;IACD,MAAM,CAAC,IAAI,CAAC,GAAG,YAAY,+BAA+B,WAAW,OAAO,cAAc,EAAE,CAAC,CAAC;AAChG,CAAC"}
|
|
@@ -1,42 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { Column, Entity } from "typeorm";
|
|
11
|
-
let PaTextCacheEntity = class PaTextCacheEntity {
|
|
12
|
-
k;
|
|
13
|
-
resourceVersion;
|
|
14
|
-
val;
|
|
15
|
-
modifiedAt;
|
|
16
|
-
readAt;
|
|
17
|
-
};
|
|
18
|
-
__decorate([
|
|
19
|
-
Column({ primary: true }),
|
|
20
|
-
__metadata("design:type", String)
|
|
21
|
-
], PaTextCacheEntity.prototype, "k", void 0);
|
|
22
|
-
__decorate([
|
|
23
|
-
Column(),
|
|
24
|
-
__metadata("design:type", String)
|
|
25
|
-
], PaTextCacheEntity.prototype, "resourceVersion", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
Column({ type: "text" }),
|
|
28
|
-
__metadata("design:type", String)
|
|
29
|
-
], PaTextCacheEntity.prototype, "val", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
Column({ type: "datetime", default: () => "current_timestamp" }),
|
|
32
|
-
__metadata("design:type", Date)
|
|
33
|
-
], PaTextCacheEntity.prototype, "modifiedAt", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
Column({ type: "datetime", default: () => "current_timestamp" }),
|
|
36
|
-
__metadata("design:type", Date)
|
|
37
|
-
], PaTextCacheEntity.prototype, "readAt", void 0);
|
|
38
|
-
PaTextCacheEntity = __decorate([
|
|
39
|
-
Entity("PaTextCache")
|
|
40
|
-
], PaTextCacheEntity);
|
|
41
|
-
export { PaTextCacheEntity };
|
|
1
|
+
export {};
|
|
42
2
|
//# sourceMappingURL=PaTextCache.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaTextCache.entity.js","sourceRoot":"","sources":["../../../src/db-init/entities/PaTextCache.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PaTextCache.entity.js","sourceRoot":"","sources":["../../../src/db-init/entities/PaTextCache.entity.ts"],"names":[],"mappings":""}
|
|
@@ -1,27 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { Column, Entity } from "typeorm";
|
|
11
|
-
let PaTextCacheDependencyEntity = class PaTextCacheDependencyEntity {
|
|
12
|
-
cacheK;
|
|
13
|
-
depK;
|
|
14
|
-
};
|
|
15
|
-
__decorate([
|
|
16
|
-
Column({ primary: true }),
|
|
17
|
-
__metadata("design:type", String)
|
|
18
|
-
], PaTextCacheDependencyEntity.prototype, "cacheK", void 0);
|
|
19
|
-
__decorate([
|
|
20
|
-
Column({ primary: true }),
|
|
21
|
-
__metadata("design:type", String)
|
|
22
|
-
], PaTextCacheDependencyEntity.prototype, "depK", void 0);
|
|
23
|
-
PaTextCacheDependencyEntity = __decorate([
|
|
24
|
-
Entity("PaTextCacheDependency")
|
|
25
|
-
], PaTextCacheDependencyEntity);
|
|
26
|
-
export { PaTextCacheDependencyEntity };
|
|
1
|
+
export {};
|
|
27
2
|
//# sourceMappingURL=PaTextCacheDependency.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaTextCacheDependency.entity.js","sourceRoot":"","sources":["../../../src/db-init/entities/PaTextCacheDependency.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PaTextCacheDependency.entity.js","sourceRoot":"","sources":["../../../src/db-init/entities/PaTextCacheDependency.entity.ts"],"names":[],"mappings":""}
|
|
@@ -1,37 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { Column, Entity } from "typeorm";
|
|
11
|
-
let PaTextCacheScheduledInvalidationEntity = class PaTextCacheScheduledInvalidationEntity {
|
|
12
|
-
eventK;
|
|
13
|
-
depK;
|
|
14
|
-
scheduledAt;
|
|
15
|
-
scheduledSince;
|
|
16
|
-
};
|
|
17
|
-
__decorate([
|
|
18
|
-
Column({ primary: true }),
|
|
19
|
-
__metadata("design:type", String)
|
|
20
|
-
], PaTextCacheScheduledInvalidationEntity.prototype, "eventK", void 0);
|
|
21
|
-
__decorate([
|
|
22
|
-
Column({ primary: true }),
|
|
23
|
-
__metadata("design:type", String)
|
|
24
|
-
], PaTextCacheScheduledInvalidationEntity.prototype, "depK", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
Column({ type: "datetime" }),
|
|
27
|
-
__metadata("design:type", Date)
|
|
28
|
-
], PaTextCacheScheduledInvalidationEntity.prototype, "scheduledAt", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
Column({ type: "datetime", default: () => "current_timestamp" }),
|
|
31
|
-
__metadata("design:type", Date)
|
|
32
|
-
], PaTextCacheScheduledInvalidationEntity.prototype, "scheduledSince", void 0);
|
|
33
|
-
PaTextCacheScheduledInvalidationEntity = __decorate([
|
|
34
|
-
Entity("PaTextCacheScheduledInvalidation")
|
|
35
|
-
], PaTextCacheScheduledInvalidationEntity);
|
|
36
|
-
export { PaTextCacheScheduledInvalidationEntity };
|
|
1
|
+
export {};
|
|
37
2
|
//# sourceMappingURL=PaTextCacheScheduledInvalidation.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaTextCacheScheduledInvalidation.entity.js","sourceRoot":"","sources":["../../../src/db-init/entities/PaTextCacheScheduledInvalidation.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PaTextCacheScheduledInvalidation.entity.js","sourceRoot":"","sources":["../../../src/db-init/entities/PaTextCacheScheduledInvalidation.entity.ts"],"names":[],"mappings":""}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { AppLogger } from "@paroicms/internal-server-lib";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Knex } from "knex";
|
|
3
3
|
import type { CreateTextCacheSystemOptions } from "../cache-system.js";
|
|
4
4
|
import type { TextCacheSystemStorage } from "../public-types.js";
|
|
5
5
|
import { type InvalidationScheduler } from "./scheduler.js";
|
|
6
6
|
export interface TextCacheSystemContext extends CreateTextCacheSystemOptions {
|
|
7
7
|
status: "ready" | "destroyed";
|
|
8
8
|
logger: AppLogger;
|
|
9
|
-
cn:
|
|
9
|
+
cn: Knex;
|
|
10
10
|
storage: TextCacheSystemStorage;
|
|
11
11
|
logNextQuery: (count?: number) => void;
|
|
12
12
|
timeToIdleDays?: number;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type Tracker } from "@paroicms/internal-server-lib";
|
|
2
|
+
import type { Knex } from "knex";
|
|
2
3
|
import type { CacheSetData, CacheValue } from "../public-types.js";
|
|
3
4
|
import type { TextCacheSystemContext } from "./cache-system-context.js";
|
|
4
|
-
export declare function insertOrUpdateCacheValue(cn:
|
|
5
|
+
export declare function insertOrUpdateCacheValue(cn: Knex, data: CacheSetData, tracker: Tracker): Promise<CacheValue>;
|
|
5
6
|
export declare function getCacheValue({ cn, timeToIdleDays, logger }: TextCacheSystemContext, cacheKey: string, tracker: Tracker): Promise<CacheValue | undefined>;
|
|
6
7
|
export declare function getDependencyKeys({ cn }: TextCacheSystemContext, cacheKey: string, tracker: Tracker): Promise<string[]>;
|
|
7
8
|
/**
|
|
8
9
|
* @returns the list of cache cacheKeys that were deleted
|
|
9
10
|
*/
|
|
10
|
-
export declare function deleteCacheValues(cn:
|
|
11
|
+
export declare function deleteCacheValues(cn: Knex, options: {
|
|
11
12
|
dependencyKeys: string[];
|
|
12
13
|
}): Promise<string[]>;
|
|
13
14
|
/**
|
package/dist/internal/queries.js
CHANGED
|
@@ -1,67 +1,48 @@
|
|
|
1
1
|
import { dateVal, strVal } from "@paroi/data-formatters-lib";
|
|
2
2
|
import { isSameTimeUnit } from "@paroicms/internal-anywhere-lib";
|
|
3
|
-
import { generateResourceVersion
|
|
3
|
+
import { generateResourceVersion } from "@paroicms/internal-server-lib";
|
|
4
4
|
import { dbSchemaName } from "../db-init/ddl-migration.js";
|
|
5
5
|
export async function insertOrUpdateCacheValue(cn, data, tracker) {
|
|
6
6
|
const resourceVersion = generateResourceVersion();
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
.delete()
|
|
10
|
-
.from("PaTextCache")
|
|
11
|
-
.andWhere("k = :k", { k: data.cacheKey })
|
|
12
|
-
.execute();
|
|
7
|
+
// Delete existing cache entry
|
|
8
|
+
await cn("PaTextCache").where("k", data.cacheKey).delete();
|
|
13
9
|
tracker.trackAccess(dbSchemaName, "PaTextCache", "delete");
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
.insert()
|
|
17
|
-
.into("PaTextCache")
|
|
18
|
-
.values({
|
|
10
|
+
// Insert new cache entry
|
|
11
|
+
await cn("PaTextCache").insert({
|
|
19
12
|
k: data.cacheKey,
|
|
20
13
|
val: data.value,
|
|
21
14
|
resourceVersion,
|
|
22
|
-
modifiedAt: ()
|
|
23
|
-
readAt: ()
|
|
24
|
-
})
|
|
25
|
-
.execute();
|
|
15
|
+
modifiedAt: cn.fn.now(),
|
|
16
|
+
readAt: cn.fn.now(),
|
|
17
|
+
});
|
|
26
18
|
tracker.trackAccess(dbSchemaName, "PaTextCache", "write");
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
.insert()
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
.execute();
|
|
36
|
-
tracker.trackAccess(dbSchemaName, "PaTextCacheDependency", "write");
|
|
19
|
+
// Insert dependencies
|
|
20
|
+
if (data.dependencyKeys.length > 0) {
|
|
21
|
+
await cn("PaTextCacheDependency").insert(data.dependencyKeys.map((depK) => ({
|
|
22
|
+
cacheK: data.cacheKey,
|
|
23
|
+
depK,
|
|
24
|
+
})));
|
|
25
|
+
tracker.trackAccess(dbSchemaName, "PaTextCacheDependency", "write");
|
|
26
|
+
}
|
|
37
27
|
return {
|
|
38
28
|
resourceVersion,
|
|
39
29
|
value: data.value,
|
|
40
30
|
};
|
|
41
31
|
}
|
|
42
32
|
export async function getCacheValue({ cn, timeToIdleDays, logger }, cacheKey, tracker) {
|
|
43
|
-
const row = await cn
|
|
44
|
-
.
|
|
45
|
-
.
|
|
46
|
-
.
|
|
47
|
-
.addSelect("c.readAt", "readAt")
|
|
48
|
-
.from("PaTextCache", "c")
|
|
49
|
-
.andWhere("c.k = :k", { k: cacheKey })
|
|
50
|
-
.getRawOne();
|
|
33
|
+
const row = await cn("PaTextCache as c")
|
|
34
|
+
.select(["c.val", "c.resourceVersion", "c.readAt"])
|
|
35
|
+
.where("c.k", cacheKey)
|
|
36
|
+
.first();
|
|
51
37
|
tracker.trackAccess(dbSchemaName, "PaTextCache", "read");
|
|
52
38
|
if (!row)
|
|
53
39
|
return;
|
|
54
40
|
const readAt = dateVal(row.readAt);
|
|
55
41
|
if (timeToIdleDays !== undefined && !isSameTimeUnit(readAt, "day")) {
|
|
56
42
|
logger.debug(`updating readAt of cache: ${cacheKey}`);
|
|
57
|
-
await cn
|
|
58
|
-
.
|
|
59
|
-
|
|
60
|
-
.set({
|
|
61
|
-
readAt: () => "current_timestamp",
|
|
62
|
-
})
|
|
63
|
-
.andWhere("k = :k", { k: cacheKey })
|
|
64
|
-
.execute();
|
|
43
|
+
await cn("PaTextCache").where("k", cacheKey).update({
|
|
44
|
+
readAt: cn.fn.now(),
|
|
45
|
+
});
|
|
65
46
|
tracker.trackAccess(dbSchemaName, "PaTextCache", "write");
|
|
66
47
|
}
|
|
67
48
|
return {
|
|
@@ -70,13 +51,10 @@ export async function getCacheValue({ cn, timeToIdleDays, logger }, cacheKey, tr
|
|
|
70
51
|
};
|
|
71
52
|
}
|
|
72
53
|
export async function getDependencyKeys({ cn }, cacheKey, tracker) {
|
|
73
|
-
const rows = await cn
|
|
74
|
-
.
|
|
75
|
-
.
|
|
76
|
-
.
|
|
77
|
-
.innerJoin("PaTextCache", "c", "c.k = d.cacheK")
|
|
78
|
-
.andWhere("c.k = :k", { k: cacheKey })
|
|
79
|
-
.getRawMany();
|
|
54
|
+
const rows = await cn("PaTextCacheDependency as d")
|
|
55
|
+
.select("d.depK")
|
|
56
|
+
.join("PaTextCache as c", "c.k", "d.cacheK")
|
|
57
|
+
.where("c.k", cacheKey);
|
|
80
58
|
tracker.trackAccess(dbSchemaName, "PaTextCacheDependency", "read");
|
|
81
59
|
return rows.map((row) => strVal(row.depK));
|
|
82
60
|
}
|
|
@@ -84,22 +62,14 @@ export async function getDependencyKeys({ cn }, cacheKey, tracker) {
|
|
|
84
62
|
* @returns the list of cache cacheKeys that were deleted
|
|
85
63
|
*/
|
|
86
64
|
export async function deleteCacheValues(cn, options) {
|
|
87
|
-
const rows = await cn
|
|
88
|
-
.
|
|
89
|
-
.
|
|
90
|
-
.
|
|
91
|
-
.innerJoin("PaTextCacheDependency", "d", "d.cacheK = c.k")
|
|
92
|
-
.andWhere("d.depK in (:...dependencyKeys)", { dependencyKeys: options.dependencyKeys })
|
|
93
|
-
.getRawMany();
|
|
65
|
+
const rows = await cn("PaTextCache as c")
|
|
66
|
+
.select("c.k")
|
|
67
|
+
.join("PaTextCacheDependency as d", "d.cacheK", "c.k")
|
|
68
|
+
.whereIn("d.depK", options.dependencyKeys);
|
|
94
69
|
const cacheKeys = rows.map((row) => strVal(row.k));
|
|
95
70
|
if (cacheKeys.length === 0)
|
|
96
71
|
return [];
|
|
97
|
-
await cn
|
|
98
|
-
.createQueryBuilder()
|
|
99
|
-
.delete()
|
|
100
|
-
.from("PaTextCache")
|
|
101
|
-
.andWhere("k in (:...cacheKeys)", { cacheKeys })
|
|
102
|
-
.execute();
|
|
72
|
+
await cn("PaTextCache").whereIn("k", cacheKeys).delete();
|
|
103
73
|
return cacheKeys;
|
|
104
74
|
}
|
|
105
75
|
/**
|
|
@@ -108,20 +78,17 @@ export async function deleteCacheValues(cn, options) {
|
|
|
108
78
|
export async function deleteUnusedCacheValues({ cn, timeToIdleDays, }) {
|
|
109
79
|
if (timeToIdleDays === undefined)
|
|
110
80
|
return;
|
|
111
|
-
const result = await cn
|
|
112
|
-
.
|
|
113
|
-
.delete()
|
|
114
|
-
|
|
115
|
-
.andWhere(`date(readAt) < date(current_timestamp, '-${timeToIdleDays} day')`)
|
|
116
|
-
.execute();
|
|
117
|
-
return result.affected ?? undefined;
|
|
81
|
+
const result = await cn("PaTextCache")
|
|
82
|
+
.whereRaw(`date(readAt) < date(current_timestamp, '-${timeToIdleDays} day')`)
|
|
83
|
+
.delete();
|
|
84
|
+
return result;
|
|
118
85
|
}
|
|
119
86
|
export async function invalidateAllCacheValues({ cn, }) {
|
|
120
|
-
await cn
|
|
121
|
-
await cn
|
|
87
|
+
await cn("PaTextCacheDependency").delete();
|
|
88
|
+
await cn("PaTextCache").delete();
|
|
122
89
|
}
|
|
123
90
|
export async function clearCacheValues({ cn }) {
|
|
124
91
|
await invalidateAllCacheValues({ cn });
|
|
125
|
-
await cn
|
|
92
|
+
await cn("PaTextCacheScheduledInvalidation").delete();
|
|
126
93
|
}
|
|
127
94
|
//# sourceMappingURL=queries.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../src/internal/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,
|
|
1
|
+
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../src/internal/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAgB,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAEtF,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAI3D,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,EAAQ,EACR,IAAkB,EAClB,OAAgB;IAEhB,MAAM,eAAe,GAAG,uBAAuB,EAAE,CAAC;IAElD,8BAA8B;IAC9B,MAAM,EAAE,CAAC,aAAa,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,CAAC;IAC3D,OAAO,CAAC,WAAW,CAAC,YAAY,EAAE,aAAa,EAAE,QAAQ,CAAC,CAAC;IAE3D,yBAAyB;IACzB,MAAM,EAAE,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC;QAC7B,CAAC,EAAE,IAAI,CAAC,QAAQ;QAChB,GAAG,EAAE,IAAI,CAAC,KAAK;QACf,eAAe;QACf,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE;QACvB,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE;KACpB,CAAC,CAAC;IACH,OAAO,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AC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEtC,MAAM,EAAE,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,MAAM,EAAE,CAAC;IAEzD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,EAC5C,EAAE,EACF,cAAc,GACS;IACvB,IAAI,cAAc,KAAK,SAAS;QAAE,OAAO;IAEzC,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC;SACnC,QAAQ,CAAC,4CAA4C,cAAc,QAAQ,CAAC;SAC5E,MAAM,EAAE,CAAC;IAEZ,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,EAC7C,EAAE,GACiC;IACnC,MAAM,EAAE,CAAC,uBAAuB,CAAC,CAAC,MAAM,EAAE,CAAC;IAC3C,MAAM,EAAE,CAAC,aAAa,CAAC,CAAC,MAAM,EAAE,CAAC;AACnC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,EAAE,EAAE,EAAsC;IAC/E,MAAM,wBAAwB,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACvC,MAAM,EAAE,CAAC,kCAAkC,CAAC,CAAC,MAAM,EAAE,CAAC;AACxD,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Knex } from "knex";
|
|
2
2
|
import type { TextCacheSystemContext } from "./cache-system-context.js";
|
|
3
3
|
export declare function getNextScheduledDate({ cn, }: Pick<TextCacheSystemContext, "cn">): Promise<Date | undefined>;
|
|
4
4
|
export declare function getScheduledInvalidationEventsToFire({ cn, }: Pick<TextCacheSystemContext, "cn">): Promise<{
|
|
5
5
|
eventKey: string;
|
|
6
6
|
dependencyKeys: string[];
|
|
7
7
|
}[]>;
|
|
8
|
-
export declare function setScheduledInvalidation(cn:
|
|
8
|
+
export declare function setScheduledInvalidation(cn: Knex, options: {
|
|
9
9
|
eventKey: string;
|
|
10
10
|
dependencyKeys: string[];
|
|
11
11
|
scheduledAt: Date;
|
|
12
12
|
}): Promise<void>;
|
|
13
|
-
export declare function deleteScheduledInvalidation(cn:
|
|
14
|
-
export declare function deleteScheduledInvalidations(cn:
|
|
13
|
+
export declare function deleteScheduledInvalidation(cn: Knex, eventKey: string): Promise<void>;
|
|
14
|
+
export declare function deleteScheduledInvalidations(cn: Knex, eventKeys: string[]): Promise<void>;
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { dateVal, strVal } from "@paroi/data-formatters-lib";
|
|
2
2
|
export async function getNextScheduledDate({ cn, }) {
|
|
3
|
-
const row = await cn
|
|
4
|
-
.
|
|
5
|
-
.select("s.scheduledAt", "scheduledAt")
|
|
6
|
-
.from("PaTextCacheScheduledInvalidation", "s")
|
|
3
|
+
const row = await cn("PaTextCacheScheduledInvalidation as s")
|
|
4
|
+
.select("s.scheduledAt")
|
|
7
5
|
.orderBy("s.scheduledAt")
|
|
8
6
|
.limit(1)
|
|
9
|
-
.
|
|
7
|
+
.first();
|
|
10
8
|
return row ? dateVal(row.scheduledAt) : undefined;
|
|
11
9
|
}
|
|
12
10
|
export async function getScheduledInvalidationEventsToFire({ cn, }) {
|
|
13
|
-
const rows = await cn
|
|
14
|
-
.
|
|
15
|
-
.
|
|
16
|
-
.addSelect("s.depK", "depK")
|
|
17
|
-
.from("PaTextCacheScheduledInvalidation", "s")
|
|
18
|
-
.andWhere("s.scheduledAt <= current_timestamp")
|
|
19
|
-
.getRawMany();
|
|
11
|
+
const rows = await cn("PaTextCacheScheduledInvalidation as s")
|
|
12
|
+
.select(["s.eventK", "s.depK"])
|
|
13
|
+
.whereRaw("s.scheduledAt <= current_timestamp");
|
|
20
14
|
const events = new Map();
|
|
21
15
|
for (const row of rows) {
|
|
22
16
|
const eventKey = strVal(row.eventK);
|
|
@@ -36,32 +30,19 @@ export async function getScheduledInvalidationEventsToFire({ cn, }) {
|
|
|
36
30
|
}
|
|
37
31
|
export async function setScheduledInvalidation(cn, options) {
|
|
38
32
|
await deleteScheduledInvalidation(cn, options.eventKey);
|
|
39
|
-
|
|
40
|
-
.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
scheduledSince: () => "current_timestamp",
|
|
48
|
-
})))
|
|
49
|
-
.execute();
|
|
33
|
+
if (options.dependencyKeys.length > 0) {
|
|
34
|
+
await cn("PaTextCacheScheduledInvalidation").insert(options.dependencyKeys.map((depK) => ({
|
|
35
|
+
eventK: options.eventKey,
|
|
36
|
+
depK,
|
|
37
|
+
scheduledAt: options.scheduledAt,
|
|
38
|
+
scheduledSince: cn.fn.now(),
|
|
39
|
+
})));
|
|
40
|
+
}
|
|
50
41
|
}
|
|
51
42
|
export async function deleteScheduledInvalidation(cn, eventKey) {
|
|
52
|
-
await cn
|
|
53
|
-
.createQueryBuilder()
|
|
54
|
-
.delete()
|
|
55
|
-
.from("PaTextCacheScheduledInvalidation")
|
|
56
|
-
.andWhere("eventK = :eventK", { eventK: eventKey })
|
|
57
|
-
.execute();
|
|
43
|
+
await cn("PaTextCacheScheduledInvalidation").where("eventK", eventKey).delete();
|
|
58
44
|
}
|
|
59
45
|
export async function deleteScheduledInvalidations(cn, eventKeys) {
|
|
60
|
-
await cn
|
|
61
|
-
.createQueryBuilder()
|
|
62
|
-
.delete()
|
|
63
|
-
.from("PaTextCacheScheduledInvalidation")
|
|
64
|
-
.andWhere("eventK in (:...eventKeys)", { eventKeys })
|
|
65
|
-
.execute();
|
|
46
|
+
await cn("PaTextCacheScheduledInvalidation").whereIn("eventK", eventKeys).delete();
|
|
66
47
|
}
|
|
67
48
|
//# sourceMappingURL=scheduled-invalidation-queries.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduled-invalidation-queries.js","sourceRoot":"","sources":["../../src/internal/scheduled-invalidation-queries.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAI7D,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,EACzC,EAAE,GACiC;IACnC,MAAM,GAAG,GAAG,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"scheduled-invalidation-queries.js","sourceRoot":"","sources":["../../src/internal/scheduled-invalidation-queries.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAI7D,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,EACzC,EAAE,GACiC;IACnC,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,uCAAuC,CAAC;SAC1D,MAAM,CAAC,eAAe,CAAC;SACvB,OAAO,CAAC,eAAe,CAAC;SACxB,KAAK,CAAC,CAAC,CAAC;SACR,KAAK,EAAE,CAAC;IACX,OAAO,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACpD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oCAAoC,CAAC,EACzD,EAAE,GACiC;IACnC,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,uCAAuC,CAAC;SAC3D,MAAM,CAAC,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;SAC9B,QAAQ,CAAC,oCAAoC,CAAC,CAAC;IAElD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAoB,CAAC;IAC3C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACpC,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC5C,I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AE,SAAS,CAAC,CAAC,MAAM,EAAE,CAAC;AACrF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paroicms/server-text-cache-system",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.1",
|
|
4
4
|
"description": "Cache system.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"paroicms",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@paroi/async-lib": "~0.3.1",
|
|
31
31
|
"@paroi/data-formatters-lib": "~0.4.0",
|
|
32
|
-
"@paroicms/internal-
|
|
33
|
-
"@paroicms/internal-
|
|
34
|
-
"@paroicms/public-anywhere-lib": "0.
|
|
35
|
-
"@paroicms/public-server-lib": "0.
|
|
32
|
+
"@paroicms/internal-anywhere-lib": "1.26.0",
|
|
33
|
+
"@paroicms/internal-server-lib": "1.13.1",
|
|
34
|
+
"@paroicms/public-anywhere-lib": "0.20.0",
|
|
35
|
+
"@paroicms/public-server-lib": "0.29.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "~22.13.10",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"typescript": "~5.8.2"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"
|
|
43
|
+
"knex": "~3.1.0",
|
|
44
|
+
"sqlite3": "^5.1.7"
|
|
44
45
|
}
|
|
45
46
|
}
|