feat(commerce-backend): revalidar el storefront al crear/borrar productos
El subscriber revalidate-storefront.ts (PR #9) solo escuchaba product.updated y los eventos de variante, asi que un producto nuevo (product.created) o eliminado (product.deleted) no disparaba revalidateTag: el storefront tardaba hasta el ciclo normal de cache (~60s por pod) en reflejar altas/bajas de catalogo, a diferencia de precio/descripcion/imagenes en productos existentes, que ya viajan por product.updated.
This commit is contained in:
@@ -36,7 +36,9 @@ export default async function revalidateStorefrontHandler({
|
||||
|
||||
export const config: SubscriberConfig = {
|
||||
event: [
|
||||
"product.created",
|
||||
"product.updated",
|
||||
"product.deleted",
|
||||
"product-variant.updated",
|
||||
"product-variant.created",
|
||||
"product-variant.deleted",
|
||||
|
||||
Reference in New Issue
Block a user