docs: documented admin translations (#13864)
This commit is contained in:
@@ -370,8 +370,8 @@ const { data: products } = await query.index({
|
||||
fields: ["id", "title"],
|
||||
}, {
|
||||
cache: {
|
||||
enable: true
|
||||
}
|
||||
enable: true,
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
@@ -443,7 +443,7 @@ const { data: products } = await query.index({
|
||||
key: "products-123456",
|
||||
// to disable auto invalidation:
|
||||
// autoInvalidate: false,
|
||||
}
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
@@ -467,10 +467,10 @@ const { data: products } = await query.index({
|
||||
key: async (args, cachingModuleService) => {
|
||||
return await cachingModuleService.computeKey({
|
||||
...args,
|
||||
prefix: "products"
|
||||
prefix: "products",
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
@@ -497,7 +497,7 @@ const { data: products } = await query.index({
|
||||
cache: {
|
||||
enable: true,
|
||||
tags: ["Product:list:*"],
|
||||
}
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
@@ -525,7 +525,7 @@ const { data: products } = await query.index({
|
||||
collectionId ? `ProductCollection:${collectionId}` : undefined,
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
@@ -549,7 +549,7 @@ const { data: products } = await query.index({
|
||||
cache: {
|
||||
enable: true,
|
||||
ttl: 100, // 100 seconds
|
||||
}
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
@@ -562,15 +562,15 @@ const { data: products } = await query.index({
|
||||
entity: "product",
|
||||
fields: ["id", "title"],
|
||||
filters: {
|
||||
id: "prod_123"
|
||||
}
|
||||
id: "prod_123",
|
||||
},
|
||||
}, {
|
||||
cache: {
|
||||
enable: true,
|
||||
ttl: (args) => {
|
||||
return args[0].filters.id === "test" ? 10 : 100
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
@@ -594,7 +594,7 @@ const { data: products } = await query.index({
|
||||
cache: {
|
||||
enable: true,
|
||||
autoInvalidate: false,
|
||||
}
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
@@ -611,8 +611,8 @@ const { data: products } = await query.index({
|
||||
enable: true,
|
||||
autoInvalidate: (args) => {
|
||||
return !args[0].fields.includes("custom_field")
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
@@ -641,8 +641,8 @@ const { data: products } = await query.index({
|
||||
}, {
|
||||
cache: {
|
||||
enable: true,
|
||||
providers: ["caching-redis", "caching-memcached"]
|
||||
}
|
||||
providers: ["caching-redis", "caching-memcached"],
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
@@ -657,15 +657,15 @@ const { data: products } = await query.index({
|
||||
entity: "product",
|
||||
fields: ["id", "title"],
|
||||
filters: {
|
||||
id: "prod_123"
|
||||
}
|
||||
id: "prod_123",
|
||||
},
|
||||
}, {
|
||||
cache: {
|
||||
enable: true,
|
||||
providers: (args) => {
|
||||
return args[0].filters.id === "test" ? ["caching-redis"] : ["caching-memcached"]
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user