Api caching on incremental update

Merge the functionality in pull request #89 onto the functionality in pull request #80. This change incorporates both, with additional logic supporting incremental cache changes. This functionality has been in use at our site for three months (based on an earlier master), serving approximately 2100 individual gem versions.