docs: rename Architectural Modules to Infrastructure Modules (#12212)

* docs: rename Architectural Modules to Infrastructure Modules

* generate again
This commit is contained in:
Shahed Nasser
2025-04-17 13:20:43 +03:00
committed by GitHub
parent 8618e6ee38
commit eb73bdb478
149 changed files with 12165 additions and 12145 deletions
@@ -0,0 +1,73 @@
import { Table } from "docs-ui"
export const metadata = {
title: `In-Memory Cache Module`,
}
# {metadata.title}
The In-Memory Cache Module uses a plain JavaScript Map object to store the cached data. This module is used by default in your Medusa application.
This module is helpful for development or when youre testing out Medusa, but its not recommended to be used in production.
For production, its recommended to use modules like [Redis Cache Module](../redis/page.mdx).
---
## Register the In-Memory Cache Module
<Note>
The In-Memory Cache Module is registered by default in your application.
</Note>
Add the module into the `modules` property of the exported object in `medusa-config.ts`:
```ts title="medusa-config.ts"
import { Modules } from "@medusajs/framework/utils"
// ...
module.exports = defineConfig({
// ...
modules: [
{
resolve: "@medusajs/medusa/cache-inmemory",
options: {
// optional options
},
},
],
})
```
### In-Memory Cache Module Options
<Table>
<Table.Header>
<Table.Row>
<Table.HeaderCell>Option</Table.HeaderCell>
<Table.HeaderCell>Description</Table.HeaderCell>
<Table.HeaderCell>Default</Table.HeaderCell>
</Table.Row>
</Table.Header>
<Table.Body>
<Table.Row>
<Table.Cell>
`ttl`
</Table.Cell>
<Table.Cell>
The number of seconds an item can live in the cache before its removed.
</Table.Cell>
<Table.Cell>
`30` seconds
</Table.Cell>
</Table.Row>
</Table.Body>
</Table>