Conversation
drrobharper
left a comment
There was a problem hiding this comment.
I think I disagree with replacing the user-agent in the key with anything. We are caching responses, which are completely unrelated to the code used to make the requests or cache them.
There was a problem hiding this comment.
I'd argue against this change tbh. I think in some ways that you aren't addressing the core issue of people not bumping consumers when they make an update.
The same thing will happen with this change. They'll make a change, increment the new config version and then not update it everywhere.
We can never bump a dependency everywhere all at once, so if the user-agent/rest-client version is left in the cache key the cache will always become fragmented for a period of time. I just don't see what purpose it serves. The only reason you would want to add something into the cache key is for a breaking change to how objects are stored in the cache. IMHO if there was a requirement to do that we could deal with that at the time |
drrobharper
left a comment
There was a problem hiding this comment.
Potential addition to the README but otherwise LGTM
Co-authored-by: Rob Harper <misforturob@gmail.com>
Description
Right now HTTP-Transport-Cache includes the package version number in its key. This means for changes where there is no change to the data stored - e.g. readme changes, we are diluting the cache for where that version is updated. To fix this we have replaced the package version with a config value that we can update when we actually make a data change
Types of changes
New feature (non-breaking change which adds functionality)Breaking change (fix or feature that would cause existing functionality to change)Checklist:
I have added tests to cover my changes.