Skip to main content

StellateService

The StellateService is used to purge the Stellate cache when certain events occur.

Signature
class StellateService {    constructor(options: StellatePluginOptions)    purgeProducts(products: Product[]) => ;    purgeProductVariants(productVariants: ProductVariant[]) => ;    purgeSearchResults(items: Array<ProductVariant | Product>) => ;    purgeAllOfType(type: CachedType) => ;    purgeCollections(collections: Collection[]) => ;    purgeSearchResponseCacheIdentifiers(collections: Collection[]) => ;    purge(type: CachedType, keys?: ID[], keyName:  = 'id') => ;}

constructor

method(options: StellatePluginOptions) => StellateService

purgeProducts

method(products: Product[]) =>

Purges the cache for the given Products.

purgeProductVariants

method(productVariants: ProductVariant[]) =>

Purges the cache for the given ProductVariants.

purgeSearchResults

method(items: Array<ProductVariant | Product>) =>

Purges the cache for SearchResults which contain the given Products or ProductVariants.

purgeAllOfType

method(type: CachedType) =>

Purges the entire cache for the given type.

purgeCollections

method(collections: Collection[]) =>

Purges the cache for the given Collections.

purgeSearchResponseCacheIdentifiers

method(collections: Collection[]) =>

Purges the cache of SearchResults for the given Collections based on slug.

purge

method(type: CachedType, keys?: ID[], keyName: = 'id') =>

Purges the cache for the given type and keys.

Was this chapter helpful?
Report Issue
Edited Feb 2, 2026·Edit this page