chore(docs): Generated References (automated) (#14199)
Generated the following references: - `api_key_models` - `auth_models` - `auth_provider` - `caching` - `cart_models` - `core_flows` - `currency_models` - `customer_models` - `fulfillment_models` - `inventory_next_models` - `js_sdk` - `order_models` - `payment_models` - `pricing_models` - `product_models` - `promotion_models` - `region_models` - `sales_channel_models` - `stock_location_next_models` - `store_models` - `tax_models` - `types` - `user_models` --- > [!NOTE] > Regenerates API reference pages across models, workflows/steps, and JS SDK, and updates generated Typedoc JSON and edit-dates script. > > - **Documentation**: > - **Models References**: Regenerated pages under `apps/resources/references/*_models/variables` for `api_key`, `auth`, `cart`, `currency`, `customer`, `fulfillment`, `inventory_next`, `order`, `payment`, `pricing`, `product`, `promotion`, `region`, `sales_channel`, `stock_location_next`, `store`, `tax`, `user`. > - **Core Flows**: Added/updated `Workflows_*` and `Steps_*` reference pages across modules including `Api_Key`, `Auth`, `Cart`, `Common`, `Customer`, `Customer_Group`, `Defaults`, `Draft_Order`, `File`, `Fulfillment`, `Inventory`, `Invite`, `Line_Item`, `Order`, `Payment`, `Payment_Collection`, `Price_List`, `Pricing`, `Product`, `Product_Category`, `Promotion`, `Region`, `Reservation`, `Return_Reason`, `Sales_Channel`, `Settings`, `Shipping_Options`, `Shipping_Profile`, `Stock_Location`, `Store`, `Tax`, `User`. > - **JS SDK**: Added `js_sdk.admin.Admin.order` property and `admin.Order.updateOrderChange` method references. > - **Types**: Added `types/CachingTypes.interfaces.ICachingModuleService` reference. > - **Generated Assets**: > - Updated `utils/generated/typedoc-json-output/0-medusa.json` and `0-types.json`. > - Updated `apps/resources/generated/edit-dates.mjs`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 796f722aa33abd2033f488a33e0df81903b1b3f2. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
b3bcfb7b49
commit
471ab72ecb
+17
-17
@@ -66,7 +66,7 @@ Items that were set with `options.autoInvalidate: false` are only cleared when y
|
||||
To invalidate cache by key:
|
||||
|
||||
```ts
|
||||
await cacheModuleService.clear({
|
||||
await cachingModuleService.clear({
|
||||
key: "products" // this key would typically be a hash
|
||||
})
|
||||
```
|
||||
@@ -76,7 +76,7 @@ This example will clear the item with the key `products` regardless of its `opti
|
||||
To invalidate cache by tags:
|
||||
|
||||
```ts
|
||||
await cacheModuleService.clear({
|
||||
await cachingModuleService.clear({
|
||||
tags: ["Product:list:*"]
|
||||
})
|
||||
```
|
||||
@@ -86,7 +86,7 @@ This example will clear all items with the tag `Product:list:*` regardless of th
|
||||
To invalidate only the cache data that were set to automatically invalidate:
|
||||
|
||||
```ts
|
||||
await cacheModuleService.clear({
|
||||
await cachingModuleService.clear({
|
||||
tags: ["Product:list:*"],
|
||||
options: { autoInvalidate: true }
|
||||
})
|
||||
@@ -105,7 +105,7 @@ To clear items that were set with `options.autoInvalidate: false`, you must call
|
||||
To invalidate cache from specific providers:
|
||||
|
||||
```ts
|
||||
await cacheModuleService.clear({
|
||||
await cachingModuleService.clear({
|
||||
key: "products",
|
||||
providers: ["caching-redis", "caching-memcached"]
|
||||
})
|
||||
@@ -130,7 +130,7 @@ This method computes a cache key based on the input object. It's useful to gener
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const key = await cacheModuleService.computeKey({
|
||||
const key = await cachingModuleService.computeKey({
|
||||
id: "prod_123",
|
||||
title: "Product 123"
|
||||
})
|
||||
@@ -154,7 +154,7 @@ This method computes cache tags based on the input object. It's useful to genera
|
||||
### Example
|
||||
|
||||
```ts
|
||||
const tags = await cacheModuleService.computeTags({
|
||||
const tags = await cachingModuleService.computeTags({
|
||||
products: [{ id: "prod_123" }, { id: "prod_456" }],
|
||||
}, {
|
||||
operation: "updated"
|
||||
@@ -181,7 +181,7 @@ This method retrieves data from the cache. If neither `key` nor `tags` are provi
|
||||
To retrieve by key:
|
||||
|
||||
```ts
|
||||
const data = await cacheModuleService.get({
|
||||
const data = await cachingModuleService.get({
|
||||
key: "products", // this key would typically be a hash
|
||||
}) as { id: string; title: string; }
|
||||
```
|
||||
@@ -189,7 +189,7 @@ const data = await cacheModuleService.get({
|
||||
To retrieve by tags:
|
||||
|
||||
```ts
|
||||
const data = await cacheModuleService.get({
|
||||
const data = await cachingModuleService.get({
|
||||
tags: ["Product:list:*"],
|
||||
}) as { id: string; title: string; }[]
|
||||
```
|
||||
@@ -197,7 +197,7 @@ const data = await cacheModuleService.get({
|
||||
To retrieve by key from specific providers:
|
||||
|
||||
```ts
|
||||
const data = await cacheModuleService.get({
|
||||
const data = await cachingModuleService.get({
|
||||
key: "products", // this key would typically be a hash
|
||||
providers: ["caching-redis", "caching-memcached"]
|
||||
}) as { id: string; title: string; }
|
||||
@@ -226,8 +226,8 @@ To store with key:
|
||||
|
||||
```ts
|
||||
const data = { id: "prod_123", title: "Product 123" }
|
||||
const key = await cacheModuleService.computeKey(data)
|
||||
await cacheModuleService.set({
|
||||
const key = await cachingModuleService.computeKey(data)
|
||||
await cachingModuleService.set({
|
||||
key,
|
||||
data
|
||||
})
|
||||
@@ -243,8 +243,8 @@ Tags should follow [conventions](https://docs.medusajs.com/infrastructure-module
|
||||
|
||||
```ts
|
||||
const data = [{ id: "prod_123", title: "Product 123" }]
|
||||
const key = await cacheModuleService.computeKey(data)
|
||||
await cacheModuleService.set({
|
||||
const key = await cachingModuleService.computeKey(data)
|
||||
await cachingModuleService.set({
|
||||
key,
|
||||
data,
|
||||
tags: [`Product:${data[0].id}`, "Product:list:*"]
|
||||
@@ -255,8 +255,8 @@ To disable auto-invalidation for the item:
|
||||
|
||||
```ts
|
||||
const data = [{ id: "prod_123", title: "Product 123" }]
|
||||
const key = await cacheModuleService.computeKey(data)
|
||||
await cacheModuleService.set({
|
||||
const key = await cachingModuleService.computeKey(data)
|
||||
await cachingModuleService.set({
|
||||
key,
|
||||
data,
|
||||
options: { autoInvalidate: false }
|
||||
@@ -269,8 +269,8 @@ To store with specific providers:
|
||||
|
||||
```ts
|
||||
const data = { id: "prod_123", title: "Product 123" }
|
||||
const key = await cacheModuleService.computeKey(data)
|
||||
await cacheModuleService.set({
|
||||
const key = await cachingModuleService.computeKey(data)
|
||||
await cachingModuleService.set({
|
||||
key,
|
||||
data,
|
||||
providers: [
|
||||
|
||||
Reference in New Issue
Block a user