diff --git a/www/apps/book/public/llms-full.txt b/www/apps/book/public/llms-full.txt index f65bdaa476..421c25d02a 100644 --- a/www/apps/book/public/llms-full.txt +++ b/www/apps/book/public/llms-full.txt @@ -24310,7 +24310,7 @@ While this is the recommended way to create a Medusa application, you can altern ### Prerequisites -- [Node.js v20+](https://nodejs.org/en/download) +- [Node.js v20+ (LTS versions)](https://nodejs.org/en/download) - [Git CLI tool](https://git-scm.com/downloads) - [PostgreSQL](https://www.postgresql.org/download/) @@ -44095,6 +44095,8 @@ Learn more about the Caching Module in the [Caching Module guide](https://docs.m In this guide, you'll learn about the Caching Module and its providers. +Refer to the [Medusa Cache Cloud](https://docs.medusajs.com/cloud/cache/index.html.md) guide for setting up the Caching Module in Cloud. + The Caching Module is available starting [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0). It replaces the deprecated [Cache Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/infrastructure-modules/cache/index.html.md). ## What is the Caching Module? @@ -44117,14 +44119,12 @@ If you're using the Cache Module in your application, refer to the [migrate to t ## Install the Caching Module +### Prerequisites + +- [Redis installed and Redis server running](https://redis.io/docs/getting-started/installation/) + The Caching Module is installed by default in your application. To use it, enable the caching feature flag and register the module in your `medusa-config.ts` file. -{/* - -Caching features are enabled by default for Cloud users. Learn more in the [Medusa Cache](!cloud!/cache) guide. - - */} - ### 1. Enable Caching Feature Flag The caching feature is currently behind a feature flag. To enable it, set the `MEDUSA_FF_CACHING` environment variable to `true` in your `.env` file: @@ -90318,9 +90318,14 @@ You can now create the workflow that syncs the products to Algolia. To create the workflow, create the file `src/workflows/sync-products.ts` with the following content: ```ts title="src/workflows/sync-products.ts" -import { createWorkflow, WorkflowResponse } from "@medusajs/framework/workflows-sdk" +import { + createWorkflow, + transform, + WorkflowResponse +} from "@medusajs/framework/workflows-sdk" import { useQueryGraphStep } from "@medusajs/medusa/core-flows" import { syncProductsStep, SyncProductsStepInput } from "./steps/sync-products" +import { ProductStatus } from "@medusajs/framework/utils" type SyncProductsWorkflowInput = { filters?: Record @@ -90331,6 +90336,14 @@ type SyncProductsWorkflowInput = { export const syncProductsWorkflow = createWorkflow( "sync-products", ({ filters, limit, offset }: SyncProductsWorkflowInput) => { + const productFilters = transform({ + filters + }, (data) => { + return { + status: ProductStatus.PUBLISHED, + ...data.filters + } + }) const { data, metadata } = useQueryGraphStep({ entity: "product", fields: [ @@ -90349,10 +90362,7 @@ export const syncProductsWorkflow = createWorkflow( take: limit, skip: offset, }, - filters: { - status: "published", - ...filters, - }, + filters: productFilters, }) syncProductsStep({ @@ -90656,6 +90666,7 @@ export default async function handleProductEvents({ input: { filters: { id: data.id, + status: "published", }, }, }) @@ -98171,9 +98182,14 @@ You can now create the workflow that syncs products to Meilisearch. To create the workflow, create the file `src/workflows/sync-products.ts` with the following content: ```ts title="src/workflows/sync-products.ts" -import { createWorkflow, WorkflowResponse } from "@medusajs/framework/workflows-sdk" +import { + createWorkflow, + transform, + WorkflowResponse +} from "@medusajs/framework/workflows-sdk" import { useQueryGraphStep } from "@medusajs/medusa/core-flows" import { syncProductsStep, SyncProductsStepInput } from "./steps/sync-products" +import { ProductStatus } from "@medusajs/framework/utils" type SyncProductsWorkflowInput = { filters?: Record @@ -98184,6 +98200,14 @@ type SyncProductsWorkflowInput = { export const syncProductsWorkflow = createWorkflow( "sync-products", ({ filters, limit, offset }: SyncProductsWorkflowInput) => { + const productFilters = transform({ + filters + }, (data) => { + return { + status: ProductStatus.PUBLISHED, + ...data.filters + } + }) const { data, metadata } = useQueryGraphStep({ entity: "product", fields: [ @@ -98202,10 +98226,7 @@ export const syncProductsWorkflow = createWorkflow( take: limit, skip: offset, }, - filters: { - status: "published", - ...filters, - }, + filters: productFilters, }) syncProductsStep({ @@ -98514,6 +98535,7 @@ export default async function handleProductEvents({ input: { filters: { id: data.id, + status: "published", }, }, }) diff --git a/www/apps/resources/app/integrations/guides/algolia/page.mdx b/www/apps/resources/app/integrations/guides/algolia/page.mdx index de20539df2..deacacbcdd 100644 --- a/www/apps/resources/app/integrations/guides/algolia/page.mdx +++ b/www/apps/resources/app/integrations/guides/algolia/page.mdx @@ -540,9 +540,14 @@ You can now create the workflow that syncs the products to Algolia. To create the workflow, create the file `src/workflows/sync-products.ts` with the following content: ```ts title="src/workflows/sync-products.ts" -import { createWorkflow, WorkflowResponse } from "@medusajs/framework/workflows-sdk" +import { + createWorkflow, + transform, + WorkflowResponse +} from "@medusajs/framework/workflows-sdk" import { useQueryGraphStep } from "@medusajs/medusa/core-flows" import { syncProductsStep, SyncProductsStepInput } from "./steps/sync-products" +import { ProductStatus } from "@medusajs/framework/utils" type SyncProductsWorkflowInput = { filters?: Record @@ -553,6 +558,14 @@ type SyncProductsWorkflowInput = { export const syncProductsWorkflow = createWorkflow( "sync-products", ({ filters, limit, offset }: SyncProductsWorkflowInput) => { + const productFilters = transform({ + filters + }, (data) => { + return { + status: ProductStatus.PUBLISHED, + ...data.filters + } + }) const { data, metadata } = useQueryGraphStep({ entity: "product", fields: [ @@ -571,10 +584,7 @@ export const syncProductsWorkflow = createWorkflow( take: limit, skip: offset, }, - filters: { - status: "published", - ...filters, - }, + filters: productFilters, }) syncProductsStep({ @@ -898,6 +908,7 @@ export default async function handleProductEvents({ input: { filters: { id: data.id, + status: "published", }, }, }) diff --git a/www/apps/resources/app/integrations/guides/meilisearch/page.mdx b/www/apps/resources/app/integrations/guides/meilisearch/page.mdx index e3c9e5d34a..4a89d40271 100644 --- a/www/apps/resources/app/integrations/guides/meilisearch/page.mdx +++ b/www/apps/resources/app/integrations/guides/meilisearch/page.mdx @@ -520,9 +520,14 @@ You can now create the workflow that syncs products to Meilisearch. To create the workflow, create the file `src/workflows/sync-products.ts` with the following content: ```ts title="src/workflows/sync-products.ts" -import { createWorkflow, WorkflowResponse } from "@medusajs/framework/workflows-sdk" +import { + createWorkflow, + transform, + WorkflowResponse +} from "@medusajs/framework/workflows-sdk" import { useQueryGraphStep } from "@medusajs/medusa/core-flows" import { syncProductsStep, SyncProductsStepInput } from "./steps/sync-products" +import { ProductStatus } from "@medusajs/framework/utils" type SyncProductsWorkflowInput = { filters?: Record @@ -533,6 +538,14 @@ type SyncProductsWorkflowInput = { export const syncProductsWorkflow = createWorkflow( "sync-products", ({ filters, limit, offset }: SyncProductsWorkflowInput) => { + const productFilters = transform({ + filters + }, (data) => { + return { + status: ProductStatus.PUBLISHED, + ...data.filters + } + }) const { data, metadata } = useQueryGraphStep({ entity: "product", fields: [ @@ -551,10 +564,7 @@ export const syncProductsWorkflow = createWorkflow( take: limit, skip: offset, }, - filters: { - status: "published", - ...filters, - }, + filters: productFilters, }) syncProductsStep({ @@ -883,6 +893,7 @@ export default async function handleProductEvents({ input: { filters: { id: data.id, + status: "published", }, }, }) diff --git a/www/apps/resources/generated/edit-dates.mjs b/www/apps/resources/generated/edit-dates.mjs index e53a49fd41..584414d5e0 100644 --- a/www/apps/resources/generated/edit-dates.mjs +++ b/www/apps/resources/generated/edit-dates.mjs @@ -6039,7 +6039,7 @@ export const generatedEditDates = { "app/troubleshooting/workflow-errors/step-x-defined/page.mdx": "2025-03-21T07:09:02.741Z", "app/troubleshooting/workflow-errors/when-then/page.mdx": "2025-03-21T08:35:45.145Z", "app/how-to-tutorials/tutorials/abandoned-cart/page.mdx": "2025-06-26T11:45:57.112Z", - "app/integrations/guides/algolia/page.mdx": "2025-10-31T16:37:38.241Z", + "app/integrations/guides/algolia/page.mdx": "2025-11-20T15:20:38.696Z", "app/integrations/guides/magento/page.mdx": "2025-10-09T11:30:09.533Z", "app/js-sdk/auth/overview/page.mdx": "2025-03-28T08:05:32.622Z", "app/how-to-tutorials/tutorials/loyalty-points/page.mdx": "2025-10-09T11:27:14.961Z", @@ -6600,7 +6600,7 @@ export const generatedEditDates = { "references/core_flows/Locking/Steps_Locking/variables/core_flows.Locking.Steps_Locking.acquireLockStepId/page.mdx": "2025-09-15T09:52:14.218Z", "references/core_flows/Locking/Steps_Locking/variables/core_flows.Locking.Steps_Locking.releaseLockStepId/page.mdx": "2025-09-15T09:52:14.219Z", "references/core_flows/Locking/core_flows.Locking.Steps_Locking/page.mdx": "2025-09-15T09:52:14.217Z", - "app/integrations/guides/meilisearch/page.mdx": "2025-10-31T16:38:53.945Z", + "app/integrations/guides/meilisearch/page.mdx": "2025-11-20T15:21:44.830Z", "app/nextjs-starter/guides/storefront-returns/page.mdx": "2025-09-22T06:02:00.580Z", "references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.views/page.mdx": "2025-10-31T09:41:41.343Z", "app/data-model-repository-reference/methods/create/page.mdx": "2025-10-28T16:02:14.959Z",