Skip to main content

Retrieve Cache Settings

Retrieves the cache settings of the platform.

HTTP Request

GET/api/settings/cache

Authorization

Authorization

  • Required: Yes
  • Permission: Staff with CacheSettingsPermission or Admin
  • Permission Code: 1006
  • Authentication: Token authentication

Example Requests

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())

Response Fields

FieldTypeDescription
cache_products_cacheBooleanEnable products list caching (default: false)
cache_products_cache_timeoutIntegerProducts cache timeout in seconds (default: 60)
cache_products_cache_prefixStringProducts cache key prefix (default: "products", max 128 chars)
cache_product_cacheBooleanEnable product details caching (default: false)
cache_product_cache_timeoutIntegerProduct details cache timeout in seconds (default: 60)
cache_product_cache_prefixStringProduct details cache key prefix (default: "product", max 128 chars)
cache_products_metadata_cacheBooleanEnable products metadata caching (default: false)
cache_products_metadata_cache_timeoutIntegerProducts metadata cache timeout (default: 60)
cache_products_metadata_cache_prefixStringProducts metadata cache prefix (default: "products_metadata", max 128 chars)
cache_categories_cacheBooleanEnable categories list caching (default: false)
cache_categories_cache_timeoutIntegerCategories cache timeout in seconds (default: 60)
cache_categories_cache_prefixStringCategories cache key prefix (default: "categories", max 128 chars)
cache_category_cacheBooleanEnable individual category caching (default: false)
cache_category_cache_timeoutIntegerCategory cache timeout in seconds (default: 60)
cache_category_cache_prefixStringCategory cache key prefix (default: "category", max 128 chars)
cache_brands_cacheBooleanEnable brands list caching (default: false)
cache_brands_cache_timeoutIntegerBrands cache timeout in seconds (default: 60)
cache_brands_cache_prefixStringBrands cache key prefix (default: "brands", max 128 chars)
cache_brand_cacheBooleanEnable individual brand caching (default: false)
cache_brand_cache_timeoutIntegerBrand cache timeout in seconds (default: 60)
cache_brand_cache_prefixStringBrand cache key prefix (default: "brand", max 128 chars)
cache_posts_cacheBooleanEnable posts list caching (default: false)
cache_posts_cache_timeoutIntegerPosts cache timeout in seconds (default: 60)
cache_posts_cache_prefixStringPosts cache key prefix (default: "posts", max 128 chars)
cache_post_cacheBooleanEnable individual post caching (default: false)
cache_post_cache_timeoutIntegerPost cache timeout in seconds (default: 60)
cache_post_cache_prefixStringPost cache key prefix (default: "post", max 128 chars)
cache_post_categories_cacheBooleanEnable post categories list caching (default: false)
cache_post_categories_cache_timeoutIntegerPost categories cache timeout in seconds (default: 60)
cache_post_categories_cache_prefixStringPost categories cache key prefix (default: "post_categories", max 128 chars)
cache_post_category_cacheBooleanEnable individual post category caching (default: false)
cache_post_category_cache_timeoutIntegerPost category cache timeout in seconds (default: 60)
cache_post_category_cache_prefixStringPost cache key prefix (default: "post_category", max 128 chars)

Example Response

{
"cache_products_cache": false,
"cache_products_cache_timeout": 60,
"cache_products_cache_prefix": "products",
"cache_product_cache": false,
"cache_product_cache_timeout": 60,
"cache_product_cache_prefix": "product",
"cache_products_metadata_cache": false,
"cache_products_metadata_cache_timeout": 60,
"cache_products_metadata_cache_prefix": "products_metadata",
"cache_categories_cache": false,
"cache_categories_cache_timeout": 60,
"cache_categories_cache_prefix": "categories",
"cache_category_cache": false,
"cache_category_cache_timeout": 60,
"cache_category_cache_prefix": "category",
"cache_brands_cache": false,
"cache_brands_cache_timeout": 60,
"cache_brands_cache_prefix": "brands",
"cache_brand_cache": false,
"cache_brand_cache_timeout": 60,
"cache_brand_cache_prefix": "brand",
"cache_posts_cache": false,
"cache_posts_cache_timeout": 60,
"cache_posts_cache_prefix": "posts",
"cache_post_cache": false,
"cache_post_cache_timeout": 60,
"cache_post_cache_prefix": "post",
"cache_post_categories_cache": false,
"cache_post_categories_cache_timeout": 60,
"cache_post_categories_cache_prefix": "post_categories",
"cache_post_category_cache": false,
"cache_post_category_cache_timeout": 60,
"cache_post_category_cache_prefix": "post_category"
}