diff --git a/src/sphinxnotes/fasthtml/__init__.py b/src/sphinxnotes/fasthtml/__init__.py
index 34dcb23..bae86bf 100644
--- a/src/sphinxnotes/fasthtml/__init__.py
+++ b/src/sphinxnotes/fasthtml/__init__.py
@@ -72,7 +72,8 @@ def overwrite(name, val, optional=False):
# Do not build mo files.
overwrite('gettext_auto_build', False)
# Prevent intersphinx cache expiration.
- overwrite('intersphinx_cache_limit', -1, optional=True)
+ # See also https://github.com/sphinx-doc/sphinx/pull/12514
+ overwrite('intersphinx_cache_limit', 999, optional=True)
def _restore_config(self) -> None: