mirror of
https://github.com/JockeTF/fimfarchive.git
synced 2024-11-22 05:17:59 +01:00
Fix high memory usage from eager caching
This commit is contained in:
parent
10d906bf7c
commit
df90cd5afa
1 changed files with 3 additions and 2 deletions
|
@ -149,7 +149,7 @@ class ApiClient:
|
|||
Args:
|
||||
token: Fimfiction authorization bearer.
|
||||
"""
|
||||
self.session = self.create_session(token)
|
||||
self.token = token
|
||||
|
||||
def create_session(self, token: str) -> Session:
|
||||
"""
|
||||
|
@ -201,8 +201,9 @@ class ApiClient:
|
|||
A jsonapi response document.
|
||||
"""
|
||||
query = self.create_filter(params)
|
||||
session = self.create_session(self.token)
|
||||
|
||||
return self.session.get(path, query)
|
||||
return session.get(path, query)
|
||||
|
||||
|
||||
class Requester(ABC):
|
||||
|
|
Loading…
Reference in a new issue