diff --git a/lib/galaxy/util/rst_to_html.py b/lib/galaxy/util/rst_to_html.py index 44962d656760..1141202bb585 100644 --- a/lib/galaxy/util/rst_to_html.py +++ b/lib/galaxy/util/rst_to_html.py @@ -25,7 +25,7 @@ def write(self, str): self.log_.warning(str) -@functools.cache +@functools.lru_cache(maxsize=None) def get_publisher(error=False): docutils_writer = docutils.writers.html4css1.Writer() docutils_template_path = os.path.join(os.path.dirname(__file__), "docutils_template.txt") @@ -57,7 +57,7 @@ def get_publisher(error=False): return pub -@functools.cache +@functools.lru_cache(maxsize=None) def rst_to_html(s, error=False): if docutils is None: raise Exception("Attempted to use rst_to_html but docutils unavailable.")