TheClimateCorporation / mandoline

A distributed, versioned, multi-dimensional array database
Other
105 stars 17 forks source link

Make chunk caching less demanding on backends. #1

Closed ddrichman closed 10 years ago

ddrichman commented 10 years ago

This patch modified the ChunkStore cache system so that it makes fewer calls to the backend store. The cache uses an atom that is updated with swap!. Previously, each swap! attempt (whether it failed or succeeded that involved a cache miss resulted in a lookup call to the backend, which is idempotent but a poor implementation for performance reasons.