flash-oss / medici

Double-entry accounting system for nodejs + mongoose
MIT License
307 stars 84 forks source link

Recalc snapshot in the background after blanace() call #57

Closed koresar closed 2 years ago

koresar commented 2 years ago

Add expireBalanceSnapshotSec option. If you want to have a cached balance for long - set it to a full year for example. Default value is twice the balanceSnapshotSec (1 day by default). But set balanceSnapshotSec often enough to do balance snapshots (caches) as often as you need.