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
+1 -1
View File
@@ -139,6 +139,6 @@ class TranslatorMixin:
class HTMLTranslator(TranslatorMixin, OriginalHTMLTranslator):
@lru_cache(maxsize=2048)
@lru_cache(maxsize=256)
def css_to_xpath(self, css: str, prefix: str = "descendant-or-self::") -> str:
return super().css_to_xpath(css, prefix)