-
Notifications
You must be signed in to change notification settings - Fork 13
/
CHANGES
322 lines (222 loc) · 11.8 KB
/
CHANGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
## 1.13.0
* Support lowercase Vary and Age headers
## 1.12.0
* Add a fault_tolerant flag to fail-over to stale cache
## 1.11.1
* when ignoring parts of the query, remove query in key when all params are ignored
## 1.11.0
* Add a proc to allow ignoring parts of the query string in the key
## 1.10.0
* Pass Options To Underlying Storage Driver
* bump required ruby version to 2.3
## 1.9.0
* make purge not raise when not implemented
## 1.8.0
* Meta stores will purge keys when no entity store entries are found
## 1.7.2
* Fix key generation for requests with no query strings
## 1.7.0
* Meta stores now receive a third ttl argument to write when use_native_ttl is used.
## 1.6.1
* Revert 'No longer read responses from cache when we already have them'
## 1.6.0
* Noop backend
* No longer read responses from cache when we already have them
* renamed files from entitystore -> entity_store (metastore/cachecontrol/appengine) and added warns for old ones
## 1.5.1
* fix key generation for query strings that include encoded equals
## 1.5.0
* only catch StandardError and not Exception
## 1.4.3
* After overriding the REQUEST_METHOD, store the original request method in "rack.methodoverride.original_method"
## 1.4.1
* Ignore invalid Expires date as per RFC
## 1.4.0
* Not invalidating the cache for preflight CORS request
## 1.3.1 / October 2015
* Support Ruby 1.9
## 1.3 / Octorber 2015
* Ruby 2.0 only
* Gracefully degrade when cache store goes offline
* allow_reload/revalidate is not enabled by default
* Make Rack::Cache multithread friendly
## 1.2 / March 2012
* Fix a cookie leak vulnerability effecting large numbers of Rails 3.x installs:
https://github.com/rtomayko/rack-cache/pull/52
* Never 304 on PUT or POST requests.
* Misc bundler and test tooling fixes.
## 1.1 / September 2011
* Allow (INM/IMS) validation requests through to backend on miss. Makes it
possible to use validation for private / uncacheable responses. A number of
people using Rails's stale?() helper reported that their validation logic was
never kicking in.
* Add rack env rack-cache.force-pass option to bypass rack-cache on
per request basis
* Fix an issue with memcache namespace not being set when using the
:namespace option instead of :prefix_key.
* Fix test failures due to MockResponse changes in recent Rack
version (issue #34)
## 1.0.3 / August 2011
* Fix bug passing options to memcached and dalli
* Document cache_key
## 1.0.1 / April 2011
* Added lib/rack-cache.rb to match package name for auto-requiring machinery.
* Fixed a number of issues caused by Rack::Cache not closing the body received
from the application. Rack::Lock and other middleware use body.close to
signal the true end of request processing so failure to call this method
can result in strange issues (e.g.,
"ThreadError: deadlock; recursive locking")
* Fixed a bug where Rack::Cache would blow up writing the rack env to the meta
store when the env contained an all uppercase key whose value wasn't
marshalable. Passenger and some other stuff write such keys apparently.
* The test suite has moved from test-spec to bacon. This is a short term
solution to the problem of not being able to run tests under Ruby 1.9.x.
The test suite will be moved to basic Test::Unit style sometime in the
future.
## 1.0 / December 2010
* Rack::Cache is 1.0 and will now maintain semantic versioning <http://semver.org/>
* Add Dalli memcache client support and removed support for the unmaintained
memcache-client library. You will need to move your apps to Dalli before
upgrading rack-cache to 1.0.
## 0.5.3 / September 2010
* A matching If-Modified-Since is ignored if an If-None-Match is also provided
and doesn't match. This is in line with RFC 2616.
* Converts string status codes to integers before returns to workaround bad
behaving rack middleware and apps.
* Misc doc clean up.
## 0.5.2 / September 2009
* Exceptions raised from the metastore are not fatal. This makes a lot of
sense in most cases because its okay for the cache to be down - it
shouldn't blow up your app.
## 0.5.1 / June 2009
* Added support for memcached clusters and other advanced
configuration provided by the memcache-client and memcached
libraries. The "metastore" and "entitystore" options can now be
set to a MemCache object or Memcached object:
memcache = MemCache.new(['127.1.1.1', '127.1.1.2'], :namespace => "/foo")
use Rack::Cache,
:metastore => memcache,
:entitystore => memcache
* Fix "memcached://" metastore URL handling. The "memcached" variation
blew up, the "memcache" version was fine.
## 0.5.0 / May 2009
* Added meta and entity store implementations based on the
memcache-client library. These are the default unless the memcached
library has already been required.
* The "allow_reload" and "allow_revalidate" options now default to
false instead of true. This means we break with RFC 2616 out of
the box but this is the expected configuration in a huge majority
of gateway cache scenarios. See the docs on configuration
options for more information on these options:
http://tomayko.com/src/rack-cache/configuration
* Added Google AppEngine memcache entity store and metastore
implementations. To use GAE's memcache with rack-cache, set the
"metastore" and "entitystore" options as follows:
use Rack::Cache,
:metastore => 'gae://cache-meta',
:entitystore => 'gae://cache-body'
The 'cache-meta' and 'cache-body' parts are memcache namespace
prefixes and should be set to different values.
## 0.4.0 / March 2009
* Ruby 1.9.1 / Rack 1.0 compatible.
* Invalidate cache entries that match the request URL on non-GET/HEAD
requests. i.e., POST, PUT, DELETE cause matching cache entries to
be invalidated. The cache entry is validated with the backend using
a conditional GET the next time it's requested.
* Implement "Cache-Control: max-age=N" request directive by forcing
validation when the max-age provided exceeds the age of the cache
entry. This can be disabled by setting the "allow_revalidate" option to
false.
* Properly implement "Cache-Control: no-cache" request directive by
performing a full reload. RFC 2616 states that when "no-cache" is
present in the request, the cache MUST NOT serve a stored response even
after successful validation. This is slightly different from the
"no-cache" directive in responses, which indicates that the cache must
first validate its entry with the origin. Previously, we implemented
"no-cache" on requests by passing so no new cache entry would be stored
based on the response. Now we treat it as a forced miss and enter the
response into the cache if it's cacheable. This can be disabled by
setting the "allow_reload" option to false.
* Assume identical semantics for the "Pragma: no-cache" request header
as the "Cache-Control: no-cache" directive described above.
* Less crazy logging. When the verbose option is set, a single log entry
is written with a comma separated list of trace events. For example, if
the cache was stale but validated, the following log entry would be
written: "cache: stale, valid, store". When the verbose option is false,
no logging occurs.
* Added "X-Rack-Cache" response header with the same comma separated trace
value as described above. This gives some visibility into how the cache
processed the request.
* Add support for canonicalized cache keys, as well as custom cache key
generators, which are specified in the options as :cache_key as either
any object that has a call() or as a block. Cache key generators get
passed a request object and return a cache key string.
## 0.3.0 / December 2008
* Add support for public and private cache control directives. Responses
marked as explicitly public are cached even when the request includes
an Authorization or Cookie header. Responses marked as explicitly private
are considered uncacheable.
* Added a "private_headers" option that dictates which request headers
trigger default "private" cache control processing. By default, the
Cookie and Authorization headers are included. Headers may be added or
removed as necessary to change the default private logic.
* Adhere to must-revalidate/proxy-revalidate cache control directives by
not assigning the default_ttl to responses that don't include freshness
information. This should let us begin using default_ttl more liberally
since we can control it using the must-revalidate/proxy-revalidate directives.
* Use the s-maxage Cache-Control value in preference to max-age when
present. The ttl= method now sets the s-maxage value instead of max-age.
Code that used ttl= to control freshness at the client needs to change
to set the max-age directive explicitly.
* Enable support for X-Sendfile middleware by responding to #to_path on
bodies served from disk storage. Adding the Rack::Sendfile component
upstream from Rack::Cache will result in cached bodies being served
directly by the web server (instead of being read in Ruby).
* BUG: MetaStore hits but EntityStore misses. This would 500 previously; now
we detect it and act as if the MetaStore missed as well.
* Implement low level #purge method on all concrete entity store
classes -- removes the entity body corresponding to the SHA1 key
provided and returns nil.
* Basically sane handling of HEAD requests. A HEAD request is never passed
through to the backend except when transitioning with pass!. This means
that the cache responds to HEAD requests without invoking the backend at
all when the cached entry is fresh. When no cache entry exists, or the
cached entry is stale and can be validated, the backend is invoked with
a GET request and the HEAD is handled right before the response
is delivered upstream.
* BUG: The Age response header was not being set properly when a stale
entry was validated. This would result in Age values that exceeded
the freshness lifetime in responses.
* BUG: A cached entry in a heap meta store could be unintentionally
modified by request processing since the cached objects were being
returned directly. The result was typically missing/incorrect header
values (e.g., missing Content-Type header). [dkubb]
* BUG: 304 responses should not include entity headers (especially
Content-Length). This is causing Safari/WebKit weirdness on 304
responses.
* BUG: The If-None-Match header was being ignored, causing the cache
to send 200 responses to matching conditional GET requests.
## 0.2.0 / 2008-10-24 / Initial Release
* Document events and transitions in `rack/cache/config/default.rb`
* Basic logging support (`trace`, `warn`, `info`, `error` from within Context)
* EntityStore: store entity bodies keyed by SHA
* MetaStore: store response headers keyed by URL
* Last-Modified/ETag validation
* Vary support
* Implement error! transition
* New Rack::Cache::Core
* memcached meta and entity store implementations
* URI based storage configuration
* Read options from Rack env if present (rack-cache.XXX keys)
* `object` is now `entry`
* Documentation framework and website
* Document storage areas and implementations
* Document configuration/events
## 0.1.0 / 2008-07-21 / Proof of concept (unreleased)
* Basic core with event support
* `#import` method for bringing in config files
* Freshness based expiration
* RFC 2616 If-Modified-Since based validation
* A horribly shitty storage back-end (Hash in mem)
* Don't cache hop-by-hop headers: Connection, Keep-Alive, Proxy-Authenticate,
Proxy-Authorization, TE, Trailers, Transfer-Encoding, Upgrade