diff --git a/scrapy_poet/injection.py b/scrapy_poet/injection.py index 9642b0ea..d662ed0d 100644 --- a/scrapy_poet/injection.py +++ b/scrapy_poet/injection.py @@ -160,7 +160,7 @@ def _get_item_builder( on the registry. """ - @functools.cache # to minimize the registry queries + @functools.lru_cache(maxsize=None) # to minimize the registry queries def mapping_fn(item_cls: Callable) -> Optional[Callable]: page_object_cls: Optional[Type[ItemPage]] = self.registry.page_cls_for_item( request.url, cast(type, item_cls)