@wix/auto_sdk_cache_cache 1.0.8 → 1.0.10
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/build/cjs/index.d.ts +43 -1
- package/build/cjs/index.js +168 -15
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +69 -1
- package/build/cjs/index.typings.js +148 -15
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +47 -1
- package/build/cjs/meta.js +134 -15
- package/build/cjs/meta.js.map +1 -1
- package/build/es/{src/ssr-v1-invalidate-cache-request-cache.public.d.ts → index.d.mts} +11 -8
- package/build/es/index.mjs +143 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/{src/ssr-v1-invalidate-cache-request-cache.universal.d.ts → index.typings.d.mts} +10 -8
- package/build/es/index.typings.mjs +123 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +47 -0
- package/build/es/meta.mjs +109 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/internal/cjs/index.d.ts +43 -1
- package/build/internal/cjs/index.js +168 -15
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +69 -1
- package/build/internal/cjs/index.typings.js +148 -15
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +47 -1
- package/build/internal/cjs/meta.js +134 -15
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/{cjs/src/ssr-v1-invalidate-cache-request-cache.public.d.ts → es/index.d.mts} +11 -8
- package/build/internal/es/index.mjs +143 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/{src/ssr-v1-invalidate-cache-request-cache.universal.d.ts → index.typings.d.mts} +10 -8
- package/build/internal/es/index.typings.mjs +123 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +47 -0
- package/build/internal/es/meta.mjs +109 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/package.json +12 -10
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.context.d.ts +0 -5
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.context.js +0 -8
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.context.js.map +0 -1
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.http.d.ts +0 -28
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.http.js +0 -86
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.http.js.map +0 -1
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.d.ts +0 -14
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.js +0 -66
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.js.map +0 -1
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.public.d.ts +0 -40
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.public.js +0 -18
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.public.js.map +0 -1
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.types.d.ts +0 -30
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.types.js +0 -3
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.types.js.map +0 -1
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.d.ts +0 -67
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.js +0 -109
- package/build/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.context.d.ts +0 -5
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.context.js +0 -5
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.context.js.map +0 -1
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.http.d.ts +0 -28
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.http.js +0 -81
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.http.js.map +0 -1
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.meta.d.ts +0 -14
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.meta.js +0 -38
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.meta.js.map +0 -1
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.public.js +0 -13
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.public.js.map +0 -1
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.types.d.ts +0 -30
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.types.js +0 -2
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.types.js.map +0 -1
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.universal.js +0 -81
- package/build/es/src/ssr-v1-invalidate-cache-request-cache.universal.js.map +0 -1
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.context.d.ts +0 -5
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.context.js +0 -8
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.context.js.map +0 -1
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.http.d.ts +0 -28
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.http.js +0 -86
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.http.js.map +0 -1
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.d.ts +0 -14
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.js +0 -66
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.meta.js.map +0 -1
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.public.js +0 -18
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.public.js.map +0 -1
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.types.d.ts +0 -30
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.types.js +0 -3
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.types.js.map +0 -1
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.d.ts +0 -67
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.js +0 -109
- package/build/internal/cjs/src/ssr-v1-invalidate-cache-request-cache.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.context.d.ts +0 -5
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.context.js +0 -5
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.context.js.map +0 -1
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.http.d.ts +0 -28
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.http.js +0 -81
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.http.js.map +0 -1
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.meta.d.ts +0 -14
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.meta.js +0 -38
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.meta.js.map +0 -1
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.public.d.ts +0 -40
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.public.js +0 -13
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.public.js.map +0 -1
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.types.d.ts +0 -30
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.types.js +0 -2
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.types.js.map +0 -1
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.universal.js +0 -81
- package/build/internal/es/src/ssr-v1-invalidate-cache-request-cache.universal.js.map +0 -1
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.purgeSiteCache = exports.invalidateCache = void 0;
|
|
4
|
-
const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
|
|
5
|
-
function resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl(opts) {
|
|
6
|
-
const domainToMappings = {
|
|
7
|
-
'api._api_base_domain_': [
|
|
8
|
-
{
|
|
9
|
-
srcPath: '/wix-public-html-cache-invalidate-webapp',
|
|
10
|
-
destPath: '',
|
|
11
|
-
},
|
|
12
|
-
],
|
|
13
|
-
'manage._base_domain_': [
|
|
14
|
-
{
|
|
15
|
-
srcPath: '/_api/wix-public-html-cache-invalidate-webapp/v1/purge-site-cache',
|
|
16
|
-
destPath: '/v1/purge-site-cache',
|
|
17
|
-
},
|
|
18
|
-
],
|
|
19
|
-
};
|
|
20
|
-
return (0, rest_modules_1.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
21
|
-
}
|
|
22
|
-
const PACKAGE_NAME = '@wix/auto_sdk_cache_cache';
|
|
23
|
-
/**
|
|
24
|
-
* <blockquote class="important">
|
|
25
|
-
*
|
|
26
|
-
* __Important:__
|
|
27
|
-
* This API is only supported for developing sites and works only when used together with the Web Methods or Router APIs.
|
|
28
|
-
*
|
|
29
|
-
* </blockquote>
|
|
30
|
-
*
|
|
31
|
-
* Invalidates or clears previously cached return values based on specified tags.
|
|
32
|
-
*
|
|
33
|
-
* The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of site [web methods](https://dev.wix.com/docs/sdk/core-modules/web-methods/introduction) and [routers](https://dev.wix.com/docs/velo/events-service-plugins/routers/service-plugins/wix-router/introduction#events-service-plugins_routers_service-plugins_wix-router_router-caching).
|
|
34
|
-
*
|
|
35
|
-
* For example, an array such as `[{ tag: "contacts" }, { tag: "labels" }]` will clear any cached return values tagged with "contacts" or "labels."
|
|
36
|
-
*
|
|
37
|
-
* Any cache containing at least one tag specified in the `invalidationMethods` parameter will be cleared.
|
|
38
|
-
*
|
|
39
|
-
* >**Notes:**
|
|
40
|
-
* >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated.
|
|
41
|
-
* >- If you don't call Invalidate Cache, caches are only invalidated when the Time to Live (TTL) expires or when the site is republished with a code change.
|
|
42
|
-
* >- This method does not invalidate the Server Side Rendering (SSR) cache for your site. To invalidate that cache, use the Invalidate Cache method from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
|
|
43
|
-
*/
|
|
44
|
-
function invalidateCache(payload) {
|
|
45
|
-
function __invalidateCache({ host }) {
|
|
46
|
-
const metadata = {
|
|
47
|
-
entityFqdn: 'wix.ssr.v1.invalidate_cache_request',
|
|
48
|
-
method: 'POST',
|
|
49
|
-
methodFqn: 'com.wixpress.html.cache.invalidate.InvalidateCacheService.invalidateCache',
|
|
50
|
-
packageName: PACKAGE_NAME,
|
|
51
|
-
url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({
|
|
52
|
-
protoPath: '/v1/invalidate-cache',
|
|
53
|
-
data: payload,
|
|
54
|
-
host,
|
|
55
|
-
}),
|
|
56
|
-
data: payload,
|
|
57
|
-
};
|
|
58
|
-
return metadata;
|
|
59
|
-
}
|
|
60
|
-
return __invalidateCache;
|
|
61
|
-
}
|
|
62
|
-
exports.invalidateCache = invalidateCache;
|
|
63
|
-
/**
|
|
64
|
-
* Invalidates or clears previously cached return values based on metaSiteID.
|
|
65
|
-
* Takes the metaSiteID from the context and performs a hard purge.
|
|
66
|
-
*/
|
|
67
|
-
function purgeSiteCache(payload) {
|
|
68
|
-
function __purgeSiteCache({ host }) {
|
|
69
|
-
const metadata = {
|
|
70
|
-
entityFqdn: 'wix.ssr.v1.invalidate_cache_request',
|
|
71
|
-
method: 'POST',
|
|
72
|
-
methodFqn: 'com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache',
|
|
73
|
-
packageName: PACKAGE_NAME,
|
|
74
|
-
url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({
|
|
75
|
-
protoPath: '/v1/purge-site-cache',
|
|
76
|
-
data: payload,
|
|
77
|
-
host,
|
|
78
|
-
}),
|
|
79
|
-
data: payload,
|
|
80
|
-
};
|
|
81
|
-
return metadata;
|
|
82
|
-
}
|
|
83
|
-
return __purgeSiteCache;
|
|
84
|
-
}
|
|
85
|
-
exports.purgeSiteCache = purgeSiteCache;
|
|
86
|
-
//# sourceMappingURL=ssr-v1-invalidate-cache-request-cache.http.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ssr-v1-invalidate-cache-request-cache.http.js","sourceRoot":"","sources":["../../../../src/ssr-v1-invalidate-cache-request-cache.http.ts"],"names":[],"mappings":";;;AAAA,gEAA2D;AAI3D,SAAS,8DAA8D,CACrE,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,uBAAuB,EAAE;YACvB;gBACE,OAAO,EAAE,0CAA0C;gBACnD,QAAQ,EAAE,EAAE;aACb;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EACL,mEAAmE;gBACrE,QAAQ,EAAE,sBAAsB;aACjC;SACF;KACF,CAAC;IAEF,OAAO,IAAA,yBAAU,EAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,YAAY,GAAG,2BAA2B,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAgB,eAAe,CAAC,OAAe;IAC7C,SAAS,iBAAiB,CAAC,EAAE,IAAI,EAAO;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,qCAAqC;YACjD,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,2EAA2E;YAC7E,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,8DAA8D,CAAC;gBAClE,SAAS,EAAE,sBAAsB;gBACjC,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,IAAI,EAAE,OAAO;SACd,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AApBD,0CAoBC;AAED;;;GAGG;AACH,SAAgB,cAAc,CAAC,OAAe;IAC5C,SAAS,gBAAgB,CAAC,EAAE,IAAI,EAAO;QACrC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,qCAAqC;YACjD,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,0EAA0E;YAC5E,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,8DAA8D,CAAC;gBAClE,SAAS,EAAE,sBAAsB;gBACjC,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,IAAI,EAAE,OAAO;SACd,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AApBD,wCAoBC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as ambassadorWixSsrV1InvalidateCacheRequestTypes from './ssr-v1-invalidate-cache-request-cache.types.js';
|
|
2
|
-
import * as ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes from './ssr-v1-invalidate-cache-request-cache.universal.js';
|
|
3
|
-
export type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
4
|
-
getUrl: (context: any) => string;
|
|
5
|
-
httpMethod: K;
|
|
6
|
-
path: string;
|
|
7
|
-
pathParams: M;
|
|
8
|
-
__requestType: T;
|
|
9
|
-
__originalRequestType: S;
|
|
10
|
-
__responseType: Q;
|
|
11
|
-
__originalResponseType: R;
|
|
12
|
-
};
|
|
13
|
-
export declare function invalidateCache(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes.InvalidateCacheRequest, ambassadorWixSsrV1InvalidateCacheRequestTypes.InvalidateCacheRequest, ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes.InvalidateCacheResponse, ambassadorWixSsrV1InvalidateCacheRequestTypes.InvalidateCacheResponse>;
|
|
14
|
-
export declare function purgeSiteCache(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes.PurgeSiteCacheRequest, ambassadorWixSsrV1InvalidateCacheRequestTypes.PurgeSiteCacheRequest, ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes.PurgeSiteCacheResponse, ambassadorWixSsrV1InvalidateCacheRequestTypes.PurgeSiteCacheResponse>;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.purgeSiteCache = exports.invalidateCache = void 0;
|
|
27
|
-
const ambassadorWixSsrV1InvalidateCacheRequest = __importStar(require("./ssr-v1-invalidate-cache-request-cache.http.js"));
|
|
28
|
-
function invalidateCache() {
|
|
29
|
-
const payload = {};
|
|
30
|
-
const getRequestOptions = ambassadorWixSsrV1InvalidateCacheRequest.invalidateCache(payload);
|
|
31
|
-
const getUrl = (context) => {
|
|
32
|
-
const { url } = getRequestOptions(context);
|
|
33
|
-
return url;
|
|
34
|
-
};
|
|
35
|
-
return {
|
|
36
|
-
getUrl,
|
|
37
|
-
httpMethod: 'POST',
|
|
38
|
-
path: '/v1/invalidate-cache',
|
|
39
|
-
pathParams: {},
|
|
40
|
-
__requestType: null,
|
|
41
|
-
__originalRequestType: null,
|
|
42
|
-
__responseType: null,
|
|
43
|
-
__originalResponseType: null,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
exports.invalidateCache = invalidateCache;
|
|
47
|
-
function purgeSiteCache() {
|
|
48
|
-
const payload = {};
|
|
49
|
-
const getRequestOptions = ambassadorWixSsrV1InvalidateCacheRequest.purgeSiteCache(payload);
|
|
50
|
-
const getUrl = (context) => {
|
|
51
|
-
const { url } = getRequestOptions(context);
|
|
52
|
-
return url;
|
|
53
|
-
};
|
|
54
|
-
return {
|
|
55
|
-
getUrl,
|
|
56
|
-
httpMethod: 'POST',
|
|
57
|
-
path: '/v1/purge-site-cache',
|
|
58
|
-
pathParams: {},
|
|
59
|
-
__requestType: null,
|
|
60
|
-
__originalRequestType: null,
|
|
61
|
-
__responseType: null,
|
|
62
|
-
__originalResponseType: null,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
exports.purgeSiteCache = purgeSiteCache;
|
|
66
|
-
//# sourceMappingURL=ssr-v1-invalidate-cache-request-cache.meta.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ssr-v1-invalidate-cache-request-cache.meta.js","sourceRoot":"","sources":["../../../../src/ssr-v1-invalidate-cache-request-cache.meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0HAA4G;AAsB5G,SAAgB,eAAe;IAQ7B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,wCAAwC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAEpE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,sBAAsB;QAC5B,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AA5BD,0CA4BC;AAED,SAAgB,cAAc;IAQ5B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,wCAAwC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAEnE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,sBAAsB;QAC5B,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AA5BD,wCA4BC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.purgeSiteCache = exports.invalidateCache = exports.__metadata = void 0;
|
|
4
|
-
const ssr_v1_invalidate_cache_request_cache_universal_js_1 = require("./ssr-v1-invalidate-cache-request-cache.universal.js");
|
|
5
|
-
exports.__metadata = { PACKAGE_NAME: '@wix/cache' };
|
|
6
|
-
function invalidateCache(httpClient) {
|
|
7
|
-
return (invalidationMethods) => (0, ssr_v1_invalidate_cache_request_cache_universal_js_1.invalidateCache)(invalidationMethods,
|
|
8
|
-
// @ts-ignore
|
|
9
|
-
{ httpClient });
|
|
10
|
-
}
|
|
11
|
-
exports.invalidateCache = invalidateCache;
|
|
12
|
-
function purgeSiteCache(httpClient) {
|
|
13
|
-
return () => (0, ssr_v1_invalidate_cache_request_cache_universal_js_1.purgeSiteCache)(
|
|
14
|
-
// @ts-ignore
|
|
15
|
-
{ httpClient });
|
|
16
|
-
}
|
|
17
|
-
exports.purgeSiteCache = purgeSiteCache;
|
|
18
|
-
//# sourceMappingURL=ssr-v1-invalidate-cache-request-cache.public.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ssr-v1-invalidate-cache-request-cache.public.js","sourceRoot":"","sources":["../../../../src/ssr-v1-invalidate-cache-request-cache.public.ts"],"names":[],"mappings":";;;AACA,6HAI8D;AAEjD,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC;AAEzD,SAAgB,eAAe,CAC7B,UAAsB;IAEtB,OAAO,CAAC,mBAA0C,EAAE,EAAE,CACpD,IAAA,oEAAwB,EACtB,mBAAmB;IACnB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AATD,0CASC;AA4BD,SAAgB,cAAc,CAC5B,UAAsB;IAEtB,OAAO,GAAG,EAAE,CACV,IAAA,mEAAuB;IACrB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,wCAQC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export interface InvalidateCacheRequest {
|
|
2
|
-
/**
|
|
3
|
-
* An array of objects containing a `tag` field used to identify the cache to invalidate. All cached return values with any listed tags are invalidated. If no tags are specified, nothing is invalidated.
|
|
4
|
-
* @maxSize 100
|
|
5
|
-
*/
|
|
6
|
-
invalidationMethods?: InvalidationMethods[];
|
|
7
|
-
}
|
|
8
|
-
export interface InvalidationMethods extends InvalidationMethodsInvalidateByOneOf {
|
|
9
|
-
/**
|
|
10
|
-
* *Required.** Identifier of the caches to invalidate.
|
|
11
|
-
* @maxLength 500
|
|
12
|
-
* @minLength 1
|
|
13
|
-
*/
|
|
14
|
-
tag?: string;
|
|
15
|
-
}
|
|
16
|
-
/** @oneof */
|
|
17
|
-
export interface InvalidationMethodsInvalidateByOneOf {
|
|
18
|
-
/**
|
|
19
|
-
* *Required.** Identifier of the caches to invalidate.
|
|
20
|
-
* @maxLength 500
|
|
21
|
-
* @minLength 1
|
|
22
|
-
*/
|
|
23
|
-
tag?: string;
|
|
24
|
-
}
|
|
25
|
-
export interface InvalidateCacheResponse {
|
|
26
|
-
}
|
|
27
|
-
export interface PurgeSiteCacheRequest {
|
|
28
|
-
}
|
|
29
|
-
export interface PurgeSiteCacheResponse {
|
|
30
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ssr-v1-invalidate-cache-request-cache.types.js","sourceRoot":"","sources":["../../../../src/ssr-v1-invalidate-cache-request-cache.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
export interface InvalidateCacheRequest {
|
|
2
|
-
/**
|
|
3
|
-
* An array of objects containing a `tag` field used to identify the cache to invalidate. All cached return values with any listed tags are invalidated. If no tags are specified, nothing is invalidated.
|
|
4
|
-
* @maxSize 100
|
|
5
|
-
*/
|
|
6
|
-
invalidationMethods?: InvalidationMethods[];
|
|
7
|
-
}
|
|
8
|
-
export interface InvalidationMethods extends InvalidationMethodsInvalidateByOneOf {
|
|
9
|
-
/**
|
|
10
|
-
* *Required.** Identifier of the caches to invalidate.
|
|
11
|
-
* @maxLength 500
|
|
12
|
-
* @minLength 1
|
|
13
|
-
*/
|
|
14
|
-
tag?: string;
|
|
15
|
-
}
|
|
16
|
-
/** @oneof */
|
|
17
|
-
export interface InvalidationMethodsInvalidateByOneOf {
|
|
18
|
-
/**
|
|
19
|
-
* *Required.** Identifier of the caches to invalidate.
|
|
20
|
-
* @maxLength 500
|
|
21
|
-
* @minLength 1
|
|
22
|
-
*/
|
|
23
|
-
tag?: string;
|
|
24
|
-
}
|
|
25
|
-
export interface InvalidateCacheResponse {
|
|
26
|
-
}
|
|
27
|
-
export interface PurgeSiteCacheRequest {
|
|
28
|
-
}
|
|
29
|
-
export interface PurgeSiteCacheResponse {
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* <blockquote class="important">
|
|
33
|
-
*
|
|
34
|
-
* __Important:__
|
|
35
|
-
* This API is only supported for developing sites and works only when used together with the Web Methods or Router APIs.
|
|
36
|
-
*
|
|
37
|
-
* </blockquote>
|
|
38
|
-
*
|
|
39
|
-
* Invalidates or clears previously cached return values based on specified tags.
|
|
40
|
-
*
|
|
41
|
-
* The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of site [web methods](https://dev.wix.com/docs/sdk/core-modules/web-methods/introduction) and [routers](https://dev.wix.com/docs/velo/events-service-plugins/routers/service-plugins/wix-router/introduction#events-service-plugins_routers_service-plugins_wix-router_router-caching).
|
|
42
|
-
*
|
|
43
|
-
* For example, an array such as `[{ tag: "contacts" }, { tag: "labels" }]` will clear any cached return values tagged with "contacts" or "labels."
|
|
44
|
-
*
|
|
45
|
-
* Any cache containing at least one tag specified in the `invalidationMethods` parameter will be cleared.
|
|
46
|
-
*
|
|
47
|
-
* >**Notes:**
|
|
48
|
-
* >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated.
|
|
49
|
-
* >- If you don't call Invalidate Cache, caches are only invalidated when the Time to Live (TTL) expires or when the site is republished with a code change.
|
|
50
|
-
* >- This method does not invalidate the Server Side Rendering (SSR) cache for your site. To invalidate that cache, use the Invalidate Cache method from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
|
|
51
|
-
* @param invalidationMethods - An array of objects containing a `tag` field used to identify the cache to invalidate. All cached return values with any listed tags are invalidated. If no tags are specified, nothing is invalidated.
|
|
52
|
-
* @public
|
|
53
|
-
* @documentationMaturity preview
|
|
54
|
-
* @requiredField invalidationMethods
|
|
55
|
-
* @permissionId SSR.INVALIDATE_CACHE
|
|
56
|
-
* @fqn com.wixpress.html.cache.invalidate.InvalidateCacheService.invalidateCache
|
|
57
|
-
*/
|
|
58
|
-
export declare function invalidateCache(invalidationMethods: InvalidationMethods[]): Promise<void>;
|
|
59
|
-
/**
|
|
60
|
-
* Invalidates or clears previously cached return values based on metaSiteID.
|
|
61
|
-
* Takes the metaSiteID from the context and performs a hard purge.
|
|
62
|
-
* @public
|
|
63
|
-
* @documentationMaturity preview
|
|
64
|
-
* @permissionId SSR.PURGE_SITE_CACHE
|
|
65
|
-
* @fqn com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache
|
|
66
|
-
*/
|
|
67
|
-
export declare function purgeSiteCache(): Promise<void>;
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.purgeSiteCache = exports.invalidateCache = void 0;
|
|
27
|
-
const transform_error_1 = require("@wix/sdk-runtime/transform-error");
|
|
28
|
-
const rename_all_nested_keys_1 = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
29
|
-
const ambassadorWixSsrV1InvalidateCacheRequest = __importStar(require("./ssr-v1-invalidate-cache-request-cache.http.js"));
|
|
30
|
-
/**
|
|
31
|
-
* <blockquote class="important">
|
|
32
|
-
*
|
|
33
|
-
* __Important:__
|
|
34
|
-
* This API is only supported for developing sites and works only when used together with the Web Methods or Router APIs.
|
|
35
|
-
*
|
|
36
|
-
* </blockquote>
|
|
37
|
-
*
|
|
38
|
-
* Invalidates or clears previously cached return values based on specified tags.
|
|
39
|
-
*
|
|
40
|
-
* The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of site [web methods](https://dev.wix.com/docs/sdk/core-modules/web-methods/introduction) and [routers](https://dev.wix.com/docs/velo/events-service-plugins/routers/service-plugins/wix-router/introduction#events-service-plugins_routers_service-plugins_wix-router_router-caching).
|
|
41
|
-
*
|
|
42
|
-
* For example, an array such as `[{ tag: "contacts" }, { tag: "labels" }]` will clear any cached return values tagged with "contacts" or "labels."
|
|
43
|
-
*
|
|
44
|
-
* Any cache containing at least one tag specified in the `invalidationMethods` parameter will be cleared.
|
|
45
|
-
*
|
|
46
|
-
* >**Notes:**
|
|
47
|
-
* >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated.
|
|
48
|
-
* >- If you don't call Invalidate Cache, caches are only invalidated when the Time to Live (TTL) expires or when the site is republished with a code change.
|
|
49
|
-
* >- This method does not invalidate the Server Side Rendering (SSR) cache for your site. To invalidate that cache, use the Invalidate Cache method from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
|
|
50
|
-
* @param invalidationMethods - An array of objects containing a `tag` field used to identify the cache to invalidate. All cached return values with any listed tags are invalidated. If no tags are specified, nothing is invalidated.
|
|
51
|
-
* @public
|
|
52
|
-
* @documentationMaturity preview
|
|
53
|
-
* @requiredField invalidationMethods
|
|
54
|
-
* @permissionId SSR.INVALIDATE_CACHE
|
|
55
|
-
* @fqn com.wixpress.html.cache.invalidate.InvalidateCacheService.invalidateCache
|
|
56
|
-
*/
|
|
57
|
-
async function invalidateCache(invalidationMethods) {
|
|
58
|
-
// @ts-ignore
|
|
59
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
60
|
-
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
61
|
-
invalidationMethods: invalidationMethods,
|
|
62
|
-
});
|
|
63
|
-
const reqOpts = ambassadorWixSsrV1InvalidateCacheRequest.invalidateCache(payload);
|
|
64
|
-
sideEffects?.onSiteCall?.();
|
|
65
|
-
try {
|
|
66
|
-
const result = await httpClient.request(reqOpts);
|
|
67
|
-
sideEffects?.onSuccess?.(result);
|
|
68
|
-
}
|
|
69
|
-
catch (err) {
|
|
70
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
71
|
-
spreadPathsToArguments: {},
|
|
72
|
-
explicitPathsToArguments: { invalidationMethods: '$[0]' },
|
|
73
|
-
singleArgumentUnchanged: false,
|
|
74
|
-
}, ['invalidationMethods']);
|
|
75
|
-
sideEffects?.onError?.(err);
|
|
76
|
-
throw transformedError;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
exports.invalidateCache = invalidateCache;
|
|
80
|
-
/**
|
|
81
|
-
* Invalidates or clears previously cached return values based on metaSiteID.
|
|
82
|
-
* Takes the metaSiteID from the context and performs a hard purge.
|
|
83
|
-
* @public
|
|
84
|
-
* @documentationMaturity preview
|
|
85
|
-
* @permissionId SSR.PURGE_SITE_CACHE
|
|
86
|
-
* @fqn com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache
|
|
87
|
-
*/
|
|
88
|
-
async function purgeSiteCache() {
|
|
89
|
-
// @ts-ignore
|
|
90
|
-
const { httpClient, sideEffects } = arguments[0];
|
|
91
|
-
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({});
|
|
92
|
-
const reqOpts = ambassadorWixSsrV1InvalidateCacheRequest.purgeSiteCache(payload);
|
|
93
|
-
sideEffects?.onSiteCall?.();
|
|
94
|
-
try {
|
|
95
|
-
const result = await httpClient.request(reqOpts);
|
|
96
|
-
sideEffects?.onSuccess?.(result);
|
|
97
|
-
}
|
|
98
|
-
catch (err) {
|
|
99
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
100
|
-
spreadPathsToArguments: {},
|
|
101
|
-
explicitPathsToArguments: {},
|
|
102
|
-
singleArgumentUnchanged: false,
|
|
103
|
-
}, []);
|
|
104
|
-
sideEffects?.onError?.(err);
|
|
105
|
-
throw transformedError;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
exports.purgeSiteCache = purgeSiteCache;
|
|
109
|
-
//# sourceMappingURL=ssr-v1-invalidate-cache-request-cache.universal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ssr-v1-invalidate-cache-request-cache.universal.js","sourceRoot":"","sources":["../../../../src/ssr-v1-invalidate-cache-request-cache.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAAuF;AACvF,oFAAgG;AAEhG,0HAA4G;AAoC5G;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACI,KAAK,UAAU,eAAe,CACnC,mBAA0C;IAE1C,aAAa;IACb,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC,CAG9C,CAAC;IAEF,MAAM,OAAO,GAAG,IAAA,8DAAqC,EAAC;QACpD,mBAAmB,EAAE,mBAAmB;KACzC,CAAC,CAAC;IAEH,MAAM,OAAO,GACX,wCAAwC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAEpE,WAAW,EAAE,UAAU,EAAE,EAAE,CAAC;IAC5B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjD,WAAW,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,gBAAgB,GAAG,IAAA,gCAAiB,EACxC,GAAG,EACH;YACE,sBAAsB,EAAE,EAAE;YAC1B,wBAAwB,EAAE,EAAE,mBAAmB,EAAE,MAAM,EAAE;YACzD,uBAAuB,EAAE,KAAK;SAC/B,EACD,CAAC,qBAAqB,CAAC,CACxB,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC;AAlCD,0CAkCC;AAED;;;;;;;GAOG;AACI,KAAK,UAAU,cAAc;IAClC,aAAa;IACb,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC,CAG9C,CAAC;IAEF,MAAM,OAAO,GAAG,IAAA,8DAAqC,EAAC,EAAE,CAAC,CAAC;IAE1D,MAAM,OAAO,GACX,wCAAwC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAEnE,WAAW,EAAE,UAAU,EAAE,EAAE,CAAC;IAC5B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjD,WAAW,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,gBAAgB,GAAG,IAAA,gCAAiB,EACxC,GAAG,EACH;YACE,sBAAsB,EAAE,EAAE;YAC1B,wBAAwB,EAAE,EAAE;YAC5B,uBAAuB,EAAE,KAAK;SAC/B,EACD,EAAE,CACH,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC;AA9BD,wCA8BC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/ssr-v1-invalidate-cache-request-cache.context.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../index.ts"],"names":[],"mappings":"AAAA,cAAc,wDAAwD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/ssr-v1-invalidate-cache-request-cache.universal.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../../index.typings.ts"],"names":[],"mappings":"AAAA,cAAc,0DAA0D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/ssr-v1-invalidate-cache-request-cache.meta.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../meta.ts"],"names":[],"mappings":"AAAA,cAAc,qDAAqD,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { invalidateCache as publicInvalidateCache, purgeSiteCache as publicPurgeSiteCache } from './ssr-v1-invalidate-cache-request-cache.public.js';
|
|
2
|
-
import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
|
|
3
|
-
export declare const invalidateCache: MaybeContext<BuildRESTFunction<typeof publicInvalidateCache> & typeof publicInvalidateCache>;
|
|
4
|
-
export declare const purgeSiteCache: MaybeContext<BuildRESTFunction<typeof publicPurgeSiteCache> & typeof publicPurgeSiteCache>;
|
|
5
|
-
export { InvalidateCacheRequest, InvalidationMethods, InvalidationMethodsInvalidateByOneOf, InvalidateCacheResponse, PurgeSiteCacheRequest, PurgeSiteCacheResponse, } from './ssr-v1-invalidate-cache-request-cache.universal.js';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { invalidateCache as publicInvalidateCache, purgeSiteCache as publicPurgeSiteCache, } from './ssr-v1-invalidate-cache-request-cache.public.js';
|
|
2
|
-
import { createRESTModule } from '@wix/sdk-runtime/rest-modules';
|
|
3
|
-
export const invalidateCache = /*#__PURE__*/ createRESTModule(publicInvalidateCache);
|
|
4
|
-
export const purgeSiteCache = /*#__PURE__*/ createRESTModule(publicPurgeSiteCache);
|
|
5
|
-
//# sourceMappingURL=ssr-v1-invalidate-cache-request-cache.context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ssr-v1-invalidate-cache-request-cache.context.js","sourceRoot":"","sources":["../../../../src/ssr-v1-invalidate-cache-request-cache.context.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,IAAI,qBAAqB,EACxC,cAAc,IAAI,oBAAoB,GACvC,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,MAAM,CAAC,MAAM,eAAe,GAExB,aAAa,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;AAC1D,MAAM,CAAC,MAAM,cAAc,GAEvB,aAAa,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
-
/**
|
|
3
|
-
* <blockquote class="important">
|
|
4
|
-
*
|
|
5
|
-
* __Important:__
|
|
6
|
-
* This API is only supported for developing sites and works only when used together with the Web Methods or Router APIs.
|
|
7
|
-
*
|
|
8
|
-
* </blockquote>
|
|
9
|
-
*
|
|
10
|
-
* Invalidates or clears previously cached return values based on specified tags.
|
|
11
|
-
*
|
|
12
|
-
* The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of site [web methods](https://dev.wix.com/docs/sdk/core-modules/web-methods/introduction) and [routers](https://dev.wix.com/docs/velo/events-service-plugins/routers/service-plugins/wix-router/introduction#events-service-plugins_routers_service-plugins_wix-router_router-caching).
|
|
13
|
-
*
|
|
14
|
-
* For example, an array such as `[{ tag: "contacts" }, { tag: "labels" }]` will clear any cached return values tagged with "contacts" or "labels."
|
|
15
|
-
*
|
|
16
|
-
* Any cache containing at least one tag specified in the `invalidationMethods` parameter will be cleared.
|
|
17
|
-
*
|
|
18
|
-
* >**Notes:**
|
|
19
|
-
* >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated.
|
|
20
|
-
* >- If you don't call Invalidate Cache, caches are only invalidated when the Time to Live (TTL) expires or when the site is republished with a code change.
|
|
21
|
-
* >- This method does not invalidate the Server Side Rendering (SSR) cache for your site. To invalidate that cache, use the Invalidate Cache method from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
|
|
22
|
-
*/
|
|
23
|
-
export declare function invalidateCache(payload: object): RequestOptionsFactory<any>;
|
|
24
|
-
/**
|
|
25
|
-
* Invalidates or clears previously cached return values based on metaSiteID.
|
|
26
|
-
* Takes the metaSiteID from the context and performs a hard purge.
|
|
27
|
-
*/
|
|
28
|
-
export declare function purgeSiteCache(payload: object): RequestOptionsFactory<any>;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { resolveUrl } from '@wix/sdk-runtime/rest-modules';
|
|
2
|
-
function resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl(opts) {
|
|
3
|
-
const domainToMappings = {
|
|
4
|
-
'api._api_base_domain_': [
|
|
5
|
-
{
|
|
6
|
-
srcPath: '/wix-public-html-cache-invalidate-webapp',
|
|
7
|
-
destPath: '',
|
|
8
|
-
},
|
|
9
|
-
],
|
|
10
|
-
'manage._base_domain_': [
|
|
11
|
-
{
|
|
12
|
-
srcPath: '/_api/wix-public-html-cache-invalidate-webapp/v1/purge-site-cache',
|
|
13
|
-
destPath: '/v1/purge-site-cache',
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
|
-
};
|
|
17
|
-
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
18
|
-
}
|
|
19
|
-
const PACKAGE_NAME = '@wix/auto_sdk_cache_cache';
|
|
20
|
-
/**
|
|
21
|
-
* <blockquote class="important">
|
|
22
|
-
*
|
|
23
|
-
* __Important:__
|
|
24
|
-
* This API is only supported for developing sites and works only when used together with the Web Methods or Router APIs.
|
|
25
|
-
*
|
|
26
|
-
* </blockquote>
|
|
27
|
-
*
|
|
28
|
-
* Invalidates or clears previously cached return values based on specified tags.
|
|
29
|
-
*
|
|
30
|
-
* The `invalidationMethods` parameter accepts an array of objects, each containing a `tag` field. These tags are defined when caching return values of site [web methods](https://dev.wix.com/docs/sdk/core-modules/web-methods/introduction) and [routers](https://dev.wix.com/docs/velo/events-service-plugins/routers/service-plugins/wix-router/introduction#events-service-plugins_routers_service-plugins_wix-router_router-caching).
|
|
31
|
-
*
|
|
32
|
-
* For example, an array such as `[{ tag: "contacts" }, { tag: "labels" }]` will clear any cached return values tagged with "contacts" or "labels."
|
|
33
|
-
*
|
|
34
|
-
* Any cache containing at least one tag specified in the `invalidationMethods` parameter will be cleared.
|
|
35
|
-
*
|
|
36
|
-
* >**Notes:**
|
|
37
|
-
* >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated.
|
|
38
|
-
* >- If you don't call Invalidate Cache, caches are only invalidated when the Time to Live (TTL) expires or when the site is republished with a code change.
|
|
39
|
-
* >- This method does not invalidate the Server Side Rendering (SSR) cache for your site. To invalidate that cache, use the Invalidate Cache method from the [`wix-site-backend`](https://dev.wix.com/docs/velo/api-reference/wix-site-backend/invalidate-cache) module.
|
|
40
|
-
*/
|
|
41
|
-
export function invalidateCache(payload) {
|
|
42
|
-
function __invalidateCache({ host }) {
|
|
43
|
-
const metadata = {
|
|
44
|
-
entityFqdn: 'wix.ssr.v1.invalidate_cache_request',
|
|
45
|
-
method: 'POST',
|
|
46
|
-
methodFqn: 'com.wixpress.html.cache.invalidate.InvalidateCacheService.invalidateCache',
|
|
47
|
-
packageName: PACKAGE_NAME,
|
|
48
|
-
url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({
|
|
49
|
-
protoPath: '/v1/invalidate-cache',
|
|
50
|
-
data: payload,
|
|
51
|
-
host,
|
|
52
|
-
}),
|
|
53
|
-
data: payload,
|
|
54
|
-
};
|
|
55
|
-
return metadata;
|
|
56
|
-
}
|
|
57
|
-
return __invalidateCache;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Invalidates or clears previously cached return values based on metaSiteID.
|
|
61
|
-
* Takes the metaSiteID from the context and performs a hard purge.
|
|
62
|
-
*/
|
|
63
|
-
export function purgeSiteCache(payload) {
|
|
64
|
-
function __purgeSiteCache({ host }) {
|
|
65
|
-
const metadata = {
|
|
66
|
-
entityFqdn: 'wix.ssr.v1.invalidate_cache_request',
|
|
67
|
-
method: 'POST',
|
|
68
|
-
methodFqn: 'com.wixpress.html.cache.invalidate.InvalidateCacheService.PurgeSiteCache',
|
|
69
|
-
packageName: PACKAGE_NAME,
|
|
70
|
-
url: resolveComWixpressHtmlCacheInvalidateInvalidateCacheServiceUrl({
|
|
71
|
-
protoPath: '/v1/purge-site-cache',
|
|
72
|
-
data: payload,
|
|
73
|
-
host,
|
|
74
|
-
}),
|
|
75
|
-
data: payload,
|
|
76
|
-
};
|
|
77
|
-
return metadata;
|
|
78
|
-
}
|
|
79
|
-
return __purgeSiteCache;
|
|
80
|
-
}
|
|
81
|
-
//# sourceMappingURL=ssr-v1-invalidate-cache-request-cache.http.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ssr-v1-invalidate-cache-request-cache.http.js","sourceRoot":"","sources":["../../../../src/ssr-v1-invalidate-cache-request-cache.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D,SAAS,8DAA8D,CACrE,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,uBAAuB,EAAE;YACvB;gBACE,OAAO,EAAE,0CAA0C;gBACnD,QAAQ,EAAE,EAAE;aACb;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EACL,mEAAmE;gBACrE,QAAQ,EAAE,sBAAsB;aACjC;SACF;KACF,CAAC;IAEF,OAAO,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,YAAY,GAAG,2BAA2B,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,eAAe,CAAC,OAAe;IAC7C,SAAS,iBAAiB,CAAC,EAAE,IAAI,EAAO;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,qCAAqC;YACjD,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,2EAA2E;YAC7E,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,8DAA8D,CAAC;gBAClE,SAAS,EAAE,sBAAsB;gBACjC,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,IAAI,EAAE,OAAO;SACd,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,SAAS,gBAAgB,CAAC,EAAE,IAAI,EAAO;QACrC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,qCAAqC;YACjD,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,0EAA0E;YAC5E,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,8DAA8D,CAAC;gBAClE,SAAS,EAAE,sBAAsB;gBACjC,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,IAAI,EAAE,OAAO;SACd,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as ambassadorWixSsrV1InvalidateCacheRequestTypes from './ssr-v1-invalidate-cache-request-cache.types.js';
|
|
2
|
-
import * as ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes from './ssr-v1-invalidate-cache-request-cache.universal.js';
|
|
3
|
-
export type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
4
|
-
getUrl: (context: any) => string;
|
|
5
|
-
httpMethod: K;
|
|
6
|
-
path: string;
|
|
7
|
-
pathParams: M;
|
|
8
|
-
__requestType: T;
|
|
9
|
-
__originalRequestType: S;
|
|
10
|
-
__responseType: Q;
|
|
11
|
-
__originalResponseType: R;
|
|
12
|
-
};
|
|
13
|
-
export declare function invalidateCache(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes.InvalidateCacheRequest, ambassadorWixSsrV1InvalidateCacheRequestTypes.InvalidateCacheRequest, ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes.InvalidateCacheResponse, ambassadorWixSsrV1InvalidateCacheRequestTypes.InvalidateCacheResponse>;
|
|
14
|
-
export declare function purgeSiteCache(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes.PurgeSiteCacheRequest, ambassadorWixSsrV1InvalidateCacheRequestTypes.PurgeSiteCacheRequest, ambassadorWixSsrV1InvalidateCacheRequestUniversalTypes.PurgeSiteCacheResponse, ambassadorWixSsrV1InvalidateCacheRequestTypes.PurgeSiteCacheResponse>;
|