feat: Allow specify cache in App opts.
parent
e3a037dcac
commit
fa6893eeb3
|
|
@ -24,6 +24,7 @@ export type Opts = {
|
||||||
exporter: string;
|
exporter: string;
|
||||||
noProgress: boolean;
|
noProgress: boolean;
|
||||||
monitor: boolean;
|
monitor: boolean;
|
||||||
|
cache?: Cache;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DEFAULT_OPTS: Opts = {
|
export const DEFAULT_OPTS: Opts = {
|
||||||
|
|
@ -225,7 +226,7 @@ export class App {
|
||||||
const exporters = await this.getExporters();
|
const exporters = await this.getExporters();
|
||||||
|
|
||||||
const fetcher = new BattleFetcher({
|
const fetcher = new BattleFetcher({
|
||||||
cache: new FileCache(this.state.cacheDir),
|
cache: this.opts.cache ?? new FileCache(this.state.cacheDir),
|
||||||
state: this.state,
|
state: this.state,
|
||||||
});
|
});
|
||||||
console.log("Fetching battle list...");
|
console.log("Fetching battle list...");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue