Alerting: Disable cache in rktq when fetching export data. (#77678)

* Disable cache in rktq when fecthing export rules group

* Fix export rules data being cached

* Disable cache for the rest of export endpoints
This commit is contained in:
Sonia Aguilar 2023-11-06 15:15:53 +01:00 committed by GitHub
parent c0afa74876
commit df7b760f37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -201,6 +201,7 @@ export const alertRuleApi = alertingApi.injectEndpoints({
params: { format: format, folderUid: folderUid, group: group, ruleUid: ruleUid },
responseType: 'text',
}),
keepUnusedDataFor: 0,
}),
exportReceiver: build.query<string, { receiverName: string; decrypt: boolean; format: ExportFormats }>({
query: ({ receiverName, decrypt, format }) => ({
@ -208,6 +209,7 @@ export const alertRuleApi = alertingApi.injectEndpoints({
params: { format: format, decrypt: decrypt, name: receiverName },
responseType: 'text',
}),
keepUnusedDataFor: 0,
}),
exportReceivers: build.query<string, { decrypt: boolean; format: ExportFormats }>({
query: ({ decrypt, format }) => ({
@ -215,6 +217,7 @@ export const alertRuleApi = alertingApi.injectEndpoints({
params: { format: format, decrypt: decrypt },
responseType: 'text',
}),
keepUnusedDataFor: 0,
}),
exportPolicies: build.query<string, { format: ExportFormats }>({
query: ({ format }) => ({
@ -222,6 +225,7 @@ export const alertRuleApi = alertingApi.injectEndpoints({
params: { format: format },
responseType: 'text',
}),
keepUnusedDataFor: 0,
}),
exportModifiedRuleGroup: build.mutation<
string,