Cache¶
Info
For cache usage, see Caching.
Configuration and introspection types for the client's optional GET-response cache.
CacheConfig
pydantic-model
¶
Bases: BaseModel
Configuration for the mreg-api cache.
Show JSON schema:
{
"description": "Configuration for the mreg-api cache.",
"properties": {
"enable": {
"default": true,
"title": "Enable",
"type": "boolean"
},
"ttl": {
"default": 300,
"title": "Ttl",
"type": "integer"
},
"tag": {
"default": "mreg-api",
"title": "Tag",
"type": "string"
},
"timeout": {
"default": 60,
"title": "Timeout",
"type": "integer"
},
"directory": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Directory"
}
},
"title": "CacheConfig",
"type": "object"
}
Fields:
CacheInfo
pydantic-model
¶
Bases: BaseModel
Information about the cache.
Show JSON schema:
{
"description": "Information about the cache.",
"properties": {
"items": {
"title": "Items",
"type": "integer"
},
"size": {
"anyOf": [
{
"pattern": "^\\s*(\\d*\\.?\\d+)\\s*(\\w+)?",
"type": "string"
},
{
"minimum": 0,
"type": "integer"
}
],
"title": "Size"
},
"hits": {
"title": "Hits",
"type": "integer"
},
"misses": {
"title": "Misses",
"type": "integer"
},
"ttl": {
"title": "Ttl",
"type": "integer"
},
"directory": {
"title": "Directory",
"type": "string"
}
},
"required": [
"items",
"size",
"hits",
"misses",
"ttl",
"directory"
],
"title": "CacheInfo",
"type": "object"
}
Fields: