cloudfoundry/cloud_controller_ng — pull request #222 by fraenkel (2014-05-06 04:43:42+00:00)
Title: Make sure we are going to delete the same blob

Compare the cache headers when a delete was requested and when we are about to perform the delete.
We need to guarantee that the blob has not changed in any way. The key may be reused.

There are 2 cases that caused this issue. The easiest way that this can work is if you have a buildpack with 2 binary versions.

Install buildpack v1.
Update the buildpack with v2.
Update the buildpack with v1 a few seconds later.
The delete triggered by the update with v2 should not occur, i.e., the v1 binary should remain in the blobstore.