aliostad / CacheCow

An implementation of HTTP Caching in .NET Core and 4.5.2+ for both the client and the server
MIT License
849 stars 171 forks source link

Feature/add zero downtime support with versioning #158

Closed zacharoth closed 8 years ago

zacharoth commented 8 years ago

Adds a service name and version number to the cache key to support zero downtime deployments by versioning the cache.

Also gets all the unit tests back to green

FYI @eouw0o83hf @FLGMwt

aliostad commented 8 years ago

Sorry for the delay just got internet. It seems a lot of whitespace has been changed, can you please briefly explain the changes you made and point me to the files? Thanks

zacharoth commented 8 years ago

The two caching handlers and the cache key have been changed. The rest of the changes are just updating unit tests. The changes add a service name and version number to the cache key

aliostad commented 8 years ago

I appreciate for your interest and contribution.

With such major changes to the design, contributors normally first create an issue and discuss with the project owners.

Frankly, service version should be explicit in the HTTP itself if there is a breaking change. If there is no breaking change and a new version is being deployed, it can point to an alternative cache store, causing no issue.

As such, I am afraid, this PR cannot be accepted.

zacharoth commented 8 years ago

No problem! I understand your preference for creating an issue; this was a change we made to suit our use case, and I thought I'd "do the right thing" and PR it back to your project.

Your concerns about versioning being explicit make sense. Our intent in making the service and version explicit in the cache was to shield the cache from a SOA ecosystem where routes may be similar in different services and where services are evolving quickly.

No worries, though it might be nice to cherrypick the bits that green up the unit test suite.