Retrieve Cache Settings
Retrieves the cache settings of the platform.
HTTP Request
GET/api/settings/cache
Authorization
Authorization
- Required: Yes
- Permission: Staff or Admin
- Authentication: Token authentication
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# Retrieve cache settings
4response = requests.get('http://www.example.com/api/settings/cache',
5 headers={'Authorization': 'Token <your_api_key>'}
6)
7print(response.json())1# Retrieve cache settings
2curl "http://www.example.com/api/settings/cache" -H "Authorization: Token <your_api_key>"Status Codes
| Code | Description |
|---|---|
| 200 | Request logs retrieved successfully |
| 400 | Bad request — invalid query parameters |
| 401 | Unauthorized — authentication required |
| 403 | Forbidden — insufficient permissions |
| 500 | Internal server error |
Response Fields
| Field | Type | Description |
|---|---|---|
| cache_products_cache | Boolean | Enable products list caching (default: false) |
| cache_products_cache_timeout | Integer | Products cache timeout in seconds (default: 60) |
| cache_products_cache_prefix | String | Products cache key prefix (default: "products", max 128 chars) |
| cache_product_cache | Boolean | Enable individual product caching (default: false) |
| cache_product_cache_timeout | Integer | Product cache timeout in seconds (default: 60) |
| cache_product_cache_prefix | String | Product cache key prefix (default: "product", max 128 chars) |
| cache_products_metadata_cache | Boolean | Enable products metadata caching (default: false) |
| cache_products_metadata_cache_timeout | Integer | Products metadata cache timeout (default: 60) |
| cache_products_metadata_cache_prefix | String | Products metadata cache prefix (default: "products_metadata", max 128 chars) |
| cache_categories_cache | Boolean | Enable categories list caching (default: false) |
| cache_categories_cache_timeout | Integer | Categories cache timeout in seconds (default: 60) |
| cache_categories_cache_prefix | String | Categories cache key prefix (default: "categories", max 128 chars) |
| cache_category_cache | Boolean | Enable individual category caching (default: false) |
| cache_category_cache_timeout | Integer | Category cache timeout in seconds (default: 60) |
| cache_category_cache_prefix | String | Category cache key prefix (default: "category", max 128 chars) |
| cache_brands_cache | Boolean | Enable brands list caching (default: false) |
| cache_brands_cache_timeout | Integer | Brands cache timeout in seconds (default: 60) |
| cache_brands_cache_prefix | String | Brands cache key prefix (default: "brands", max 128 chars) |
| cache_brand_cache | Boolean | Enable individual brand caching (default: false) |
| cache_brand_cache_timeout | Integer | Brand cache timeout in seconds (default: 60) |
| cache_brand_cache_prefix | String | Brand cache key prefix (default: "brand", max 128 chars) |
| cache_posts_cache | Boolean | Enable posts list caching (default: false) |
| cache_posts_cache_timeout | Integer | Posts cache timeout in seconds (default: 60) |
| cache_posts_cache_prefix | String | Posts cache key prefix (default: "posts", max 128 chars) |
| cache_post_cache | Boolean | Enable individual post caching (default: false) |
| cache_post_cache_timeout | Integer | Post cache timeout in seconds (default: 60) |
| cache_post_cache_prefix | String | Post cache key prefix (default: "post", max 128 chars) |