CHANGES 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. ## 1.2 / March 2012
  2. * Fix a cookie leak vulnerability effecting large numbers of Rails 3.x installs:
  3. https://github.com/rtomayko/rack-cache/pull/52
  4. * Never 304 on PUT or POST requests.
  5. * Misc bundler and test tooling fixes.
  6. ## 1.1 / September 2011
  7. * Allow (INM/IMS) validation requests through to backend on miss. Makes it
  8. possible to use validation for private / uncacheable responses. A number of
  9. people using Rails's stale?() helper reported that their validation logic was
  10. never kicking in.
  11. * Add rack env rack-cache.force-pass option to bypass rack-cache on
  12. per request basis
  13. * Fix an issue with memcache namespace not being set when using the
  14. :namespace option instead of :prefix_key.
  15. * Fix test failures due to MockResponse changes in recent Rack
  16. version (issue #34)
  17. ## 1.0.3 / August 2011
  18. * Fix bug passing options to memcached and dalli
  19. * Document cache_key
  20. ## 1.0.1 / April 2011
  21. * Added lib/rack-cache.rb to match package name for auto-requiring machinery.
  22. * Fixed a number of issues caused by Rack::Cache not closing the body received
  23. from the application. Rack::Lock and other middleware use body.close to
  24. signal the true end of request processing so failure to call this method
  25. can result in strange issues (e.g.,
  26. "ThreadError: deadlock; recursive locking")
  27. * Fixed a bug where Rack::Cache would blow up writing the rack env to the meta
  28. store when the env contained an all uppercase key whose value wasn't
  29. marshalable. Passenger and some other stuff write such keys apparently.
  30. * The test suite has moved from test-spec to bacon. This is a short term
  31. solution to the problem of not being able to run tests under Ruby 1.9.x.
  32. The test suite will be moved to basic Test::Unit style sometime in the
  33. future.
  34. ## 1.0 / December 2010
  35. * Rack::Cache is 1.0 and will now maintain semantic versioning <http://semver.org/>
  36. * Add Dalli memcache client support and removed support for the unmaintained
  37. memcache-client library. You will need to move your apps to Dalli before
  38. upgrading rack-cache to 1.0.
  39. ## 0.5.3 / September 2010
  40. * A matching If-Modified-Since is ignored if an If-None-Match is also provided
  41. and doesn't match. This is in line with RFC 2616.
  42. * Converts string status codes to integers before returns to workaround bad
  43. behaving rack middleware and apps.
  44. * Misc doc clean up.
  45. ## 0.5.2 / September 2009
  46. * Exceptions raised from the metastore are not fatal. This makes a lot of
  47. sense in most cases because its okay for the cache to be down - it
  48. shouldn't blow up your app.
  49. ## 0.5.1 / June 2009
  50. * Added support for memcached clusters and other advanced
  51. configuration provided by the memcache-client and memcached
  52. libraries. The "metastore" and "entitystore" options can now be
  53. set to a MemCache object or Memcached object:
  54. memcache = MemCache.new(['127.1.1.1', '127.1.1.2'], :namespace => "/foo")
  55. use Rack::Cache,
  56. :metastore => memcache,
  57. :entitystore => memcache
  58. * Fix "memcached://" metastore URL handling. The "memcached" variation
  59. blew up, the "memcache" version was fine.
  60. ## 0.5.0 / May 2009
  61. * Added meta and entity store implementations based on the
  62. memcache-client library. These are the default unless the memcached
  63. library has already been required.
  64. * The "allow_reload" and "allow_revalidate" options now default to
  65. false instead of true. This means we break with RFC 2616 out of
  66. the box but this is the expected configuration in a huge majority
  67. of gateway cache scenarios. See the docs on configuration
  68. options for more information on these options:
  69. http://tomayko.com/src/rack-cache/configuration
  70. * Added Google AppEngine memcache entity store and metastore
  71. implementations. To use GAE's memcache with rack-cache, set the
  72. "metastore" and "entitystore" options as follows:
  73. use Rack::Cache,
  74. :metastore => 'gae://cache-meta',
  75. :entitystore => 'gae://cache-body'
  76. The 'cache-meta' and 'cache-body' parts are memcache namespace
  77. prefixes and should be set to different values.
  78. ## 0.4.0 / March 2009
  79. * Ruby 1.9.1 / Rack 1.0 compatible.
  80. * Invalidate cache entries that match the request URL on non-GET/HEAD
  81. requests. i.e., POST, PUT, DELETE cause matching cache entries to
  82. be invalidated. The cache entry is validated with the backend using
  83. a conditional GET the next time it's requested.
  84. * Implement "Cache-Control: max-age=N" request directive by forcing
  85. validation when the max-age provided exceeds the age of the cache
  86. entry. This can be disabled by setting the "allow_revalidate" option to
  87. false.
  88. * Properly implement "Cache-Control: no-cache" request directive by
  89. performing a full reload. RFC 2616 states that when "no-cache" is
  90. present in the request, the cache MUST NOT serve a stored response even
  91. after successful validation. This is slightly different from the
  92. "no-cache" directive in responses, which indicates that the cache must
  93. first validate its entry with the origin. Previously, we implemented
  94. "no-cache" on requests by passing so no new cache entry would be stored
  95. based on the response. Now we treat it as a forced miss and enter the
  96. response into the cache if it's cacheable. This can be disabled by
  97. setting the "allow_reload" option to false.
  98. * Assume identical semantics for the "Pragma: no-cache" request header
  99. as the "Cache-Control: no-cache" directive described above.
  100. * Less crazy logging. When the verbose option is set, a single log entry
  101. is written with a comma separated list of trace events. For example, if
  102. the cache was stale but validated, the following log entry would be
  103. written: "cache: stale, valid, store". When the verbose option is false,
  104. no logging occurs.
  105. * Added "X-Rack-Cache" response header with the same comma separated trace
  106. value as described above. This gives some visibility into how the cache
  107. processed the request.
  108. * Add support for canonicalized cache keys, as well as custom cache key
  109. generators, which are specified in the options as :cache_key as either
  110. any object that has a call() or as a block. Cache key generators get
  111. passed a request object and return a cache key string.
  112. ## 0.3.0 / December 2008
  113. * Add support for public and private cache control directives. Responses
  114. marked as explicitly public are cached even when the request includes
  115. an Authorization or Cookie header. Responses marked as explicitly private
  116. are considered uncacheable.
  117. * Added a "private_headers" option that dictates which request headers
  118. trigger default "private" cache control processing. By default, the
  119. Cookie and Authorization headers are included. Headers may be added or
  120. removed as necessary to change the default private logic.
  121. * Adhere to must-revalidate/proxy-revalidate cache control directives by
  122. not assigning the default_ttl to responses that don't include freshness
  123. information. This should let us begin using default_ttl more liberally
  124. since we can control it using the must-revalidate/proxy-revalidate directives.
  125. * Use the s-maxage Cache-Control value in preference to max-age when
  126. present. The ttl= method now sets the s-maxage value instead of max-age.
  127. Code that used ttl= to control freshness at the client needs to change
  128. to set the max-age directive explicitly.
  129. * Enable support for X-Sendfile middleware by responding to #to_path on
  130. bodies served from disk storage. Adding the Rack::Sendfile component
  131. upstream from Rack::Cache will result in cached bodies being served
  132. directly by the web server (instead of being read in Ruby).
  133. * BUG: MetaStore hits but EntityStore misses. This would 500 previously; now
  134. we detect it and act as if the MetaStore missed as well.
  135. * Implement low level #purge method on all concrete entity store
  136. classes -- removes the entity body corresponding to the SHA1 key
  137. provided and returns nil.
  138. * Basically sane handling of HEAD requests. A HEAD request is never passed
  139. through to the backend except when transitioning with pass!. This means
  140. that the cache responds to HEAD requests without invoking the backend at
  141. all when the cached entry is fresh. When no cache entry exists, or the
  142. cached entry is stale and can be validated, the backend is invoked with
  143. a GET request and the HEAD is handled right before the response
  144. is delivered upstream.
  145. * BUG: The Age response header was not being set properly when a stale
  146. entry was validated. This would result in Age values that exceeded
  147. the freshness lifetime in responses.
  148. * BUG: A cached entry in a heap meta store could be unintentionally
  149. modified by request processing since the cached objects were being
  150. returned directly. The result was typically missing/incorrect header
  151. values (e.g., missing Content-Type header). [dkubb]
  152. * BUG: 304 responses should not include entity headers (especially
  153. Content-Length). This is causing Safari/WebKit weirdness on 304
  154. responses.
  155. * BUG: The If-None-Match header was being ignored, causing the cache
  156. to send 200 responses to matching conditional GET requests.
  157. ## 0.2.0 / 2008-10-24 / Initial Release
  158. * Document events and transitions in `rack/cache/config/default.rb`
  159. * Basic logging support (`trace`, `warn`, `info`, `error` from within Context)
  160. * EntityStore: store entity bodies keyed by SHA
  161. * MetaStore: store response headers keyed by URL
  162. * Last-Modified/ETag validation
  163. * Vary support
  164. * Implement error! transition
  165. * New Rack::Cache::Core
  166. * memcached meta and entity store implementations
  167. * URI based storage configuration
  168. * Read options from Rack env if present (rack-cache.XXX keys)
  169. * `object` is now `entry`
  170. * Documentation framework and website
  171. * Document storage areas and implementations
  172. * Document configuration/events
  173. ## 0.1.0 / 2008-07-21 / Proof of concept (unreleased)
  174. * Basic core with event support
  175. * `#import` method for bringing in config files
  176. * Freshness based expiration
  177. * RFC 2616 If-Modified-Since based validation
  178. * A horribly shitty storage back-end (Hash in mem)
  179. * Don't cache hop-by-hop headers: Connection, Keep-Alive, Proxy-Authenticate,
  180. Proxy-Authorization, TE, Trailers, Transfer-Encoding, Upgrade