0

I have been working with a bitcoin full node trying to implement a personal blockchain explorer using RPC API calls to populate an external database.

After trying to gather some statistics on RPC call speeds I noticed that there seems to be some form of caching. Not sure if this is cached on the daemon side or with the levelDB.

My goal is to compare a getRawTransaction call for each transaction vs a batch getRawTransaction call, however caching makes it quite difficult to gather stats.

Is there anyway to flush cache with bitcoind?

  • Caching shouldn't have an observable effect on RPC calls. Do you just mean speed, if so, yes - there is caching at pretty much every level, including your hard drive itself, the operating system, LevelDB, and in some cases bitcoind itself. You'd need to flush all caches, some of which are far outside of the scope of bitcoind. – Pieter Wuille Aug 31 '18 at 4:01
  • Hi @PieterWuille, thanks for your response. If we single out the LevelDB and bitcoind cache is there any documentation for how to clear this? Not to start a discussion but the question is related to improving JSON-RPC response time as we are iterating through each txid to get the input value. Would you agree that batch RPC call is the desired approach? – DanDan4561 Sep 10 '18 at 2:47

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.