Get Cache Information
GET /obp/v7.0.0/system/cache/info
OBPv6.0.0-getCacheInfo Roles: CanGetCacheInfo CacheSystemAPI
Returns detailed cache information for all namespaces:
- Namespace ID and versioned prefix
- Current version counter
- Number of keys in each namespace
- Description and category
- Storage location (redis, memory, both, or unknown)
- "redis": Keys stored in Redis
- "memory": Keys stored in in-memory cache
- "both": Keys in both locations (indicates a BUG - should never happen)
- "unknown": No keys found, storage location cannot be determined
- TTL info: Sampled TTL information from actual keys
- Shows actual TTL values from up to 5 sample keys
- Format: "123s" (fixed), "range 60s to 3600s (avg 1800s)" (variable), "no expiry" (persistent)
- Total key count across all namespaces
- Redis availability status
This endpoint helps monitor cache usage and identify which namespaces contain the most data.
Authentication is Required
User Authentication is Required. The User must be logged in. The Application must also be authenticated.
JSON response body fields (11)
- category
- current_version
- current_version
- description
- Description of the object. Maximum length is 2000. It can be any characters here.
- key_count
- key_count
- namespace_id
- namespace_id
- namespaces
- namespaces
- prefix
- prefix
- redis_available
- redis_available
- storage_location
- storage_location
- total_keys
- total_keys
- ttl_info
- ttl_info
Example success response
{
"namespaces": [
{
"namespace_id": "call_counter",
"prefix": "obp_dev_call_counter_1_",
"current_version": 1,
"key_count": 42,
"description": "Rate limit call counters",
"category": "Rate Limiting",
"storage_location": "redis",
"ttl_info": "range 60s to 86400s (avg 3600s)"
},
{
"namespace_id": "rd_localised",
"prefix": "obp_dev_rd_localised_1_",
"current_version": 1,
"key_count": 128,
"description": "Localized resource docs",
"category": "API Documentation",
"storage_location": "redis",
"ttl_info": "3600s"
}
],
"total_keys": 170,
"redis_available": true
}Possible errors (3)
- OBP-20001: User not logged in. Authentication is required!
- OBP-20006: User is missing one or more roles:
- OBP-50000: Unknown Error.