@@ -206,6 +206,7 @@ export class TraktService {
206
206
static async logout ( account ?: string ) {
207
207
await useAuthSettingsStore ( ) . setAuth ( undefined , account ) ;
208
208
await useUserSettingsStore ( ) . setUserSetting ( undefined , account ) ;
209
+ this . evict . trakt ( ) . catch ( err => Logger . error ( 'Failed to evict trakt cache' , err ) ) ;
209
210
return this . traktClient . importAuthentication ( { } ) ;
210
211
}
211
212
@@ -631,6 +632,7 @@ export class TraktService {
631
632
logout : async ( account ?: string ) => {
632
633
await useAuthSettingsStore ( ) . setAuth ( { simkl : null } , account ) ;
633
634
await useSimklStore ( ) . setUserSetting ( undefined , account ) ;
635
+ this . evict . simkl ( ) . catch ( err => Logger . error ( 'Failed to evict simkl cache' , { account, err } ) ) ;
634
636
return this . simklClient . importAuthentication ( { } ) ;
635
637
} ,
636
638
show : async ( id : string | number , extended = true ) => {
@@ -654,9 +656,9 @@ export class TraktService {
654
656
} ;
655
657
656
658
static evict = {
657
- tmdb : ( ) => TraktService . tmdbClient . clearCache ( ) ,
658
- trakt : ( ) => TraktService . traktClient . clearCache ( ) ,
659
- simkl : ( ) => TraktService . simklClient . clearCache ( ) ,
659
+ tmdb : async ( ) => TraktService . tmdbClient . clearCache ( ) ,
660
+ trakt : async ( ) => TraktService . traktClient . clearCache ( ) ,
661
+ simkl : async ( ) => TraktService . simklClient . clearCache ( ) ,
660
662
images : ( ) =>
661
663
Promise . all ( [
662
664
TraktService . tmdbClient . v3 . configuration . details . cached . evict ( ) ,
0 commit comments