interface InvalidateCacheRequest { /** * 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. * @maxSize 100 */ invalidationMethods?: InvalidationMethods[]; } interface InvalidationMethods extends InvalidationMethodsInvalidateByOneOf { /** * *Required.** Identifier of the caches to invalidate. * @maxLength 500 * @minLength 1 */ tag?: string; } /** @oneof */ interface InvalidationMethodsInvalidateByOneOf { /** * *Required.** Identifier of the caches to invalidate. * @maxLength 500 * @minLength 1 */ tag?: string; } interface InvalidateCacheResponse { } interface PurgeSiteCacheRequest { } interface PurgeSiteCacheResponse { } /** *
* * __Important:__ * This API is only supported for developing sites and works only when used together with the Web Methods or Router APIs. * ** * Invalidates or clears previously cached return values based on specified tags. * * 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). * * For example, an array such as `[{ tag: "contacts" }, { tag: "labels" }]` will clear any cached return values tagged with "contacts" or "labels." * * Any cache containing at least one tag specified in the `invalidationMethods` parameter will be cleared. * * >**Notes:** * >- If you don't specify any tags in the `invalidationMethods` parameter, no caches are invalidated. * >- 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. * >- 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. * @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. * @public * @documentationMaturity preview * @requiredField invalidationMethods * @permissionId SSR.INVALIDATE_CACHE * @fqn com.wixpress.html.cache.invalidate.InvalidateCacheService.invalidateCache */ declare function invalidateCache(invalidationMethods: InvalidationMethods[]): Promise