artsy / garner

A set of Rack middleware and cache helpers that implement various caching strategies.
MIT License
343 stars 24 forks source link

@dblock: Add JSONP strategy to strip standard JSONP parameters #5

Closed fancyremarker closed 12 years ago

fancyremarker commented 12 years ago

jQuery adds two parameters to requests: "_" and "callback". This pull request adds a new strategy, Garner::Strategies::Keys::Jsonp, to strip these two parameters so that client applications can use Garner::Strategies::Keys::RequestGet to cache by query string parameters, and still have sane caching behavior with Rack::JSONP / jQuery.

fancyremarker commented 12 years ago

Added a freebie fix to make the Garner::Strategies::Keys::Version strategy work.

dblock commented 12 years ago

Could you please update CHANGELOG as well? Thanks.

fancyremarker commented 12 years ago

Updated. If it looks good, shall we merge and version-bump?