@@ -24,9 +24,8 @@ import { Forms } from "./forms";
2424import type { MangaMetadata , WindowEntry } from "./models" ;
2525import { MainInterceptor , Requests } from "./network" ;
2626import { Parsers } from "./parsers" ;
27- import { Cache , FilterPreferences , JsonParser , Tags , Type } from "./utils" ;
27+ import { FilterPreferences , JsonParser , Tags , Type } from "./utils" ;
2828
29- export const cache = new Cache ( ) ;
3029export const filter = new FilterPreferences ( ) ;
3130export const tags = new Tags ( ) ;
3231export const types = new Type ( ) ;
@@ -165,10 +164,8 @@ export abstract class MangaWorldGeneric
165164 }
166165
167166 async getMangaDetails ( mangaId : string ) : Promise < SourceManga > {
168- const data = cache . getPageCache (
169- mangaId ,
167+ const data = this . requestManager . fetchPage (
170168 `${ this . base_url } /manga/${ mangaId } ` ,
171- this ,
172169 ) ;
173170 const html = Application . arrayBufferToUTF8String ( await data ) ;
174171 const windowEntry = jsonParser . getWindowEntry ( html ) ;
@@ -181,22 +178,17 @@ export abstract class MangaWorldGeneric
181178 }
182179
183180 async getChapters ( sourceManga : SourceManga ) : Promise < Chapter [ ] > {
184- const data = cache . getPageCache (
185- sourceManga . mangaId ,
181+ const data = this . requestManager . fetchPage (
186182 `${ this . base_url } /manga/${ sourceManga . mangaId } ` ,
187- this ,
188- 15 ,
189183 ) ;
190184 const html = Application . arrayBufferToUTF8String ( await data ) ;
191185 const windowEntry = jsonParser . getWindowEntry ( html ) ;
192186 return this . parser . parseChapters ( windowEntry , sourceManga ) ;
193187 }
194188
195189 async getChapterDetails ( chapter : Chapter ) : Promise < ChapterDetails > {
196- const data = cache . getPageCache (
197- chapter . sourceManga . mangaId ,
190+ const data = this . requestManager . fetchPage (
198191 `${ this . base_url } /manga/${ chapter . sourceManga . mangaId } ` ,
199- this ,
200192 ) ;
201193 const html = Application . arrayBufferToUTF8String ( await data ) ;
202194 const windowEntry = jsonParser . getWindowEntry ( html ) ;
@@ -351,7 +343,7 @@ export abstract class MangaWorldGeneric
351343 metadata : MangaMetadata ,
352344 ) : Promise < PagedResults < DiscoverSectionItem > > {
353345 const html = Application . arrayBufferToUTF8String (
354- await cache . getPageCache ( "home" , this . base_url , this ) ,
346+ await this . requestManager . fetchPage ( this . base_url ) ,
355347 ) ;
356348 const windowEntry = jsonParser . getWindowEntry ( html ) ;
357349 return await this . getSection ( section . id , windowEntry , metadata ) ;
0 commit comments