Support caching at node level

The idea is:

Please add support to cache the output for some specified duration

My use case:

There are use cases where there is a need to cache the output instead of executing it again and again. For example, some services generate an access token with some validity period. Now I can keep the access token in cache for that period.

I think it would be beneficial to add this because:

This not only makes the workflow faster but also avoids being rate-limited.

Hi @Bikash_Gupta,
there is community node that allows saving values in-memory in different scopes and supports TTL. Probably it could be used as some kind of add-on cache for your use-case.
Of course this adds extra burden of installing / updating community node and implementing IF logic in your workflows so probably having something like output cache build in n8n would also be interesting.

The issue with this community node is that I will have to handle IF ELSE condition to see if the data exists and if not then call whatever node means to do or else use the data from the cache. I want something built-in where the data can be cached by the node itself and if cached data is missing, it could call the logic whatever it meant to do

1 Like

That would really improve some of my workflows. I have one that executes at each message I received and there are a lot of requests I do on the flow that doesn’t change in a period of hours. So that would improve the execution time a lot!

Also having the ability to set the keys for each node caching would be necessary.

I have some webhooks that returns data which changes everyday. To avoid fetching the database each time and to get a faster response, I have another workflow with a cron job that fetches the data and stores it in a JSON file in my n8n installation. This way, the response is faster and it gets updated when it needs to.

1 Like