Skip to content

Get Service Cache Stats

GET
/api/system/cache/stats/{service}

Get service-specific cache statistics (cache module removed).

service
required
Service
string

Successful Response

ServiceCacheStatsResponse

Response for service-specific cache statistics.

Provides detailed statistics for a specific service’s cache including hit rates, miss rates, eviction counts, and efficiency scores. Essential for monitoring individual service cache performance and optimization.

Fields:

  • service_name: Name of the service cache (required, string)
  • found: Whether the service cache exists (required, boolean)
  • statistics: Service cache statistics dictionary (required, JsonDict)

Usage: GET /api/system/cache/stats/{service} returns this response model with service-specific stats.

JSON Example:

{
  "serviceName": "etherforce",
  "found": true,
  "statistics": {
    "hits": 234,
    "misses": 12,
    "hitRate": 95.12,
    "missRate": 4.88,
    "currentSize": 156,
    "maxSize": 1000,
    "evictions": 45
  }
}
object
serviceName
required
Servicename

Name of the service cache

string
found
required
Found

Whether the service cache exists

boolean
statistics
required
Statistics

Service cache statistics

object
key
additional properties
Any of:
string

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object