v1

latestOpenAPI 3.0.32026-07-14314472448.6 KB
enterprise

enable cache for a single data source

post/datasources/{dataSourceUID}/cache/enable

Path parameters

dataSourceUIDstring required

Query parameters

dataSourceTypestring

Response

CacheConfigResponse

createdstring date-time
dataSourceIDinteger

Fields that can be set by the API caller - read/write

dataSourceUIDstring
defaultTTLMsinteger

These are returned by the HTTP API, but are managed internally - read-only Note: 'created' and 'updated' are special properties managed automatically by xorm, but we are setting them manually

enabledboolean
messagestring
ttlQueriesMsinteger

TTL MS, or "time to live", is how long a cached item will stay in the cache before it is removed (in milliseconds)

ttlResourcesMsinteger
updatedstring date-time
useDefaultTTLboolean

If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini