stefanpenner / hash-for-dep

7 stars 11 forks source link

also cache the tree hash (interior cache) #35

Closed stefanpenner closed 7 years ago

stefanpenner commented 7 years ago

in addition to caching hashForDep(name, path) this PR introduces an interior cache for individual trees. As it turns out, dependencies are often shared, this now ensures deep dependencies hashes are reused.

The cache is the exact same as the that for hashForDep itself, merely prefixed the keys with hashFor. This ensures removal of the primary cache evicts all state.

stefanpenner commented 7 years ago

released as v1.1.2