fix: Limit caching in all the library

To lower memory usage with high numbers of requests. Possibly improve case #48
This commit is contained in:
Karim shoair
2025-03-15 02:01:16 +02:00
parent 4f75827641
commit 7bef44ea4c
8 changed files with 13 additions and 13 deletions
+2 -2
View File
@@ -126,7 +126,7 @@ class PlaywrightEngine:
return cdp_url
@lru_cache(typed=True)
@lru_cache(126, typed=True)
def __set_flags(self):
"""Returns the flags that will be used while launching the browser if stealth mode is enabled"""
flags = DEFAULT_STEALTH_FLAGS
@@ -169,7 +169,7 @@ class PlaywrightEngine:
return context_kwargs
@lru_cache()
@lru_cache(10)
def __stealth_scripts(self):
# Basic bypasses nothing fancy as I'm still working on it
# But with adding these bypasses to the above config, it bypasses many online tests like