Skip to content

clearCache(): void

The clearCache method allows you to clear all page cache. It is a wrapper around the Turbo.cache.clear method.

Returned value

A returned value has a type of void because this method does not return anything.

Example

In this example we make a PageManagerApi call to clear page cache.

    useStorefront(async (storefront) => {
        const pageManagerApi = storefront.getApiSync('PageManagerApi');

        pageManagerApi.clearCache();
    });

Page Manager API methods reference