mirror of
https://github.com/sct/overseerr.git
synced 2025-12-27 08:45:06 +01:00
fix(externalapi): clear cache after a request is made (#1217)
This PR clears the Radarr/Sonarr cache after a request has been made, because the media status on Radarr/Sonarr will no longer be good. It also resolves a bug that prevented the media from being deleted after a request had been sent to Radarr/Sonarr. fix #1207
This commit is contained in:
@@ -293,6 +293,14 @@ class ExternalAPI {
|
||||
return data;
|
||||
}
|
||||
|
||||
protected removeCache(endpoint: string, params?: Record<string, string>) {
|
||||
const cacheKey = this.serializeCacheKey(endpoint, {
|
||||
...this.params,
|
||||
...params,
|
||||
});
|
||||
this.cache?.del(cacheKey);
|
||||
}
|
||||
|
||||
private formatUrl(
|
||||
endpoint: string,
|
||||
params?: Record<string, string>,
|
||||
|
||||
Reference in New Issue
Block a user