# CachedContent

## Retrieve cached binary content

> Fetches pre-generated or cached binary content by key with automatic MIME type detection.\
> \
> \## Caching Strategy\
> \- \*\*Cache Duration\*\*: 100 days (client and CDN)\
> \- \*\*Optimal for\*\*: Images, PDFs, generated reports, static assets\
> \- \*\*MIME Type\*\*: Automatically detected from file extension or stored metadata\
> \
> \## Key Structure\
> Keys can use nested paths:\
> \- \`reports/monthly-2024-01.pdf\`\
> \- \`images/products/item-123.jpg\`\
> \- \`generated/invoice-456.pdf\`\
> \
> \## Use Cases\
> \- Dynamically generated images (charts, QR codes)\
> \- Report caching\
> \- Optimized asset delivery\
> \- Pre-rendered content\
> \
> \## Performance\
> Content is served directly from blob storage with aggressive caching headers to minimize server load.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"CachedContent"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"paths":{"/api/{tenantId}/cachedContent/{key}":{"get":{"tags":["CachedContent"],"summary":"Retrieve cached binary content","description":"Fetches pre-generated or cached binary content by key with automatic MIME type detection.\n\n## Caching Strategy\n- **Cache Duration**: 100 days (client and CDN)\n- **Optimal for**: Images, PDFs, generated reports, static assets\n- **MIME Type**: Automatically detected from file extension or stored metadata\n\n## Key Structure\nKeys can use nested paths:\n- `reports/monthly-2024-01.pdf`\n- `images/products/item-123.jpg`\n- `generated/invoice-456.pdf`\n\n## Use Cases\n- Dynamically generated images (charts, QR codes)\n- Report caching\n- Optimized asset delivery\n- Pre-rendered content\n\n## Performance\nContent is served directly from blob storage with aggressive caching headers to minimize server load.","parameters":[{"name":"key","in":"path","description":"Blob key (supports nested path).","required":true,"schema":{"type":"string"}},{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Binary content returned"},"404":{"description":"Content not found","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"500":{"description":"Internal server error while retrieving cached content"}}}}},"components":{"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}}}
```
