We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70ece1c commit e1f4198Copy full SHA for e1f4198
docs/web3.eth.rst
@@ -216,6 +216,18 @@ The following properties are available on the ``web3.eth`` namespace.
216
>>> web3.eth.chain_id
217
61
218
219
+ .. note::
220
+
221
+ This property gets called frequently in validation middleware,
222
+ but `chain_id` is added to the ``simple_cache_middleware`` by default.
223
+ Add the :meth:`simple_cache_middleware<web3.middleware.construct_simple_cache_middleware>`
224
+ to the ``middleware_onion`` to increase performance:
225
226
+ .. code-block:: python
227
228
+ >>> from web3.middleware import simple_cache_middleware
229
+ >>> w3.middleware_onion.add(simple_cache_middleare)
230
231
232
.. py:attribute:: Eth.chainId
233
0 commit comments