When to cache
By default, Org-roam is eager in caching: each time an Org-roam file is modified and saved, it updates the database for the corresponding file. This keeps the database up-to-date, causing the least surprise when using the interactive commands.
However, depending on how large your Org files are, database updating can be a slow operation. You can disable the automatic updating of the database by setting org-roam-db-update-on-save to nil.
Variable: org-roam-db-update-on-save
If t, update the Org-roam database upon saving the file. Disable this if your files are large and updating the database is slow.