Skip to content

Commit

Permalink
feat(AxiosRequestTemplate.ts): 新增clearCache删除所有缓存的功能
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxinssfd committed Aug 15, 2022
1 parent b4509ca commit 9600200
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/AxiosRequestTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -539,4 +539,11 @@ export class AxiosRequestTemplate<CC extends CustomConfig = CustomConfig> {
deleteCacheByTag(tag: Tag) {
this.cache.deleteByTag(tag);
}

/**
* 清理所有缓存
*/
clearCache() {
this.cache.clear();
}
}

0 comments on commit 9600200

Please sign in to comment.