- 14 6月, 2018 1 次提交
-
-
由 Daniel Schierbeck 提交于
From <https://tools.ietf.org/html/rfc5861>: > The stale-if-error HTTP Cache-Control extension allows a cache to > return a stale response when an error -- e.g., a 500 Internal Server > Error, a network segment, or DNS failure -- is encountered, rather > than returning a "hard" error. This improves availability. > > The stale-while-revalidate HTTP Cache-Control extension allows a > cache to immediately return a stale response while it revalidates it > in the background, thereby hiding latency (both in the network and on > the server) from clients. These are useful, fully standardized parts of the HTTP protocol with widespread support among CDN vendors. Supporting them will make it easier to utilize reverse proxies and CDNs from Rails.
-
- 22 8月, 2017 1 次提交
-
-
由 Yoshiyuki Hirano 提交于
-
- 29 7月, 2017 1 次提交
-
-
由 Kir Shatrov 提交于
-
- 02 7月, 2017 1 次提交
-
-
由 Matthew Draper 提交于
This reverts commit 3420a145, reversing changes made to afb66a5a.
-
- 01 7月, 2017 1 次提交
-
-
由 Kir Shatrov 提交于
-
- 30 5月, 2017 1 次提交
-
-
由 David Heinemeier Hansson 提交于
* Allow a default value to be declared for class_attribute * Convert to using class_attribute default rather than explicit setter * Removed instance_accessor option by mistake * False is a valid default value * Documentation
-
- 29 10月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 07 9月, 2016 1 次提交
-
-
由 Nate Berkopec 提交于
[ci skip]
-
- 16 8月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
-
- 07 8月, 2016 2 次提交
-
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
-
- 30 5月, 2016 1 次提交
-
-
由 Robin Dupret 提交于
Add a missing capital letter and avoid using absolute links to the API because they may refer to out-dated documentation on the Edge site.
-
- 03 4月, 2016 1 次提交
-
-
由 Vipul A M 提交于
[ci skip]
-
- 02 4月, 2016 1 次提交
-
-
由 utilum 提交于
-
- 01 4月, 2016 1 次提交
-
-
由 Jeremy Daer 提交于
* Introduce `Response#strong_etag=` and `#weak_etag=` and analogous options for `fresh_when` and `stale?`. `Response#etag=` sets a weak ETag. Strong ETags are desirable when you're serving byte-for-byte identical responses that support Range requests, like PDFs or videos (typically done by reproxying the response from a backend storage service). Also desirable when fronted by some CDNs that support strong ETags only, like Akamai. * No longer strips quotes (`"`) from ETag values before comparing them. Quotes are significant, part of the ETag. A quoted ETag and an unquoted one are not the same entity. * Support `If-None-Match: *`. Rarely useful for GET requests; meant to provide some optimistic concurrency control for PUT requests.
-
- 05 3月, 2016 1 次提交
-
-
由 Jean Boussier 提交于
-
- 03 3月, 2016 1 次提交
-
-
由 Santosh Wadghule 提交于
-
- 31 12月, 2015 1 次提交
-
-
由 Rafaël Blais Masson 提交于
Benchmark.ips do |x| x.report('Time.parse') { Time.parse('2011-01-01') } x.report('Time.new') { Time.new(2011, 1, 1) } end Calculating ------------------------------------- Time.parse 6.640k i/100ms Time.new 15.082k i/100ms ------------------------------------------------- Time.parse 71.915k (± 3.1%) i/s - 365.200k Time.new 167.645k (± 3.3%) i/s - 844.592k
-
- 15 11月, 2015 1 次提交
-
-
由 claudiob 提交于
-
- 27 8月, 2015 1 次提交
-
-
由 Aaron Patterson 提交于
Since all controller instances are required to have a request and response object, RackDelegation is no longer needed (we always have to delegate to the response)
-
- 23 5月, 2015 1 次提交
-
-
由 karanarora 提交于
spelling fix [ci skip] example to be consistent [ci skip] grammatical fix typo fixes [ci skip]
-
- 05 3月, 2015 1 次提交
-
-
- 16 2月, 2015 2 次提交
-
-
由 Robin Dupret 提交于
-
由 Arthur Neves 提交于
Add http_cache_forever to ActionController, so we can cache results forever. Things like static pages are a good candidate for this type of caching. This cache only controls caching headers, so it is up to the browser to cache those requests.
-
- 11 2月, 2015 3 次提交
-
-
由 claudiob 提交于
The methods `fresh_when` and `stale?` from ActionController::ConditionalGet accept a single record as a short form for a hash. For instance ```ruby def show @article = Article.find(params[:id]) fresh_when(@article) end ``` is just a short form for: ```ruby def show @article = Article.find(params[:id]) fresh_when(etag: @article, last_modified: @article.created_at) end ``` This commit extends `fresh_when` and `stale?` to also accept a collection of records, so that a short form similar to the one above can be used in an `index` action. After this commit, the following code: ```ruby def index @article = Article.all fresh_when(etag: @articles, last_modified: @articles.maximum(:created_at)) end ``` can be simply written as: ```ruby def index @article = Article.all fresh_when(@articles) end ```
-
由 claudiob 提交于
PR #18772 changed the parameters of `stale?` to use `kwargs`. [As for this comment](https://github.com/rails/rails/pull/18872/files#r24456288) the default value for the `etag` parameter should be `record`, not `nil`. This commit fixes the code and introduces a test that: - passed before #18872 - fails on the current master (after #18772) - passes again after setting the default value of `etag` to `record`.
-
由 Kasper Timm Hansen 提交于
-
- 07 1月, 2015 1 次提交
-
-
由 claudiob 提交于
It is clearer and closer to reality to use `@article.updated_at` as the `:last_modified` parameter of `fresh_when` and `stale?`. Using `@article.created_at` would result in the cache never expiring, since the creation timestamp never changes. [ci skip]
-
- 17 9月, 2014 2 次提交
-
-
由 Steven Harman 提交于
-
由 Steven Harman 提交于
-
- 17 8月, 2014 1 次提交
-
-
由 Jeremy Kemper 提交于
New default: the template digest is automatically included in your ETags. When you call `fresh_when @post`, the digest for `posts/show.html.erb` is mixed in so future changes to the HTML will blow HTTP caches for you. This makes it easy to HTTP-cache many more of your actions. If you render a different template, you can now pass the `:template` option to include its digest instead: fresh_when @post, template: 'widgets/show' Pass `template: false` to skip the lookup. To turn this off entirely, set: config.action_controller.etag_with_template_digest = false
-
- 01 2月, 2013 1 次提交
-
-
由 Akira Matsuda 提交于
-
- 06 1月, 2013 1 次提交
-
-
由 Akira Matsuda 提交于
* core_ext/object/blank * concern * core_ext/class/attribute * deprecation
-
- 05 12月, 2012 1 次提交
-
-
由 claudiob 提交于
Sometimes, on Mac OS X, programmers accidentally press Option+Space rather than just Space and don’t see the difference. The problem is that Option+Space writes a non-breaking space (0XA0) rather than a normal space (0x20). This commit removes all the non-breaking spaces inadvertently introduced in the comments of the code.
-
- 28 10月, 2012 1 次提交
-
-
由 AvnerCohen 提交于
-
- 23 9月, 2012 1 次提交
-
-
由 Francesco Rodriguez 提交于
-
- 07 9月, 2012 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
- 30 8月, 2012 3 次提交
-
-
由 kennyj 提交于
-
由 David Heinemeier Hansson 提交于
-
由 David Heinemeier Hansson 提交于
Added controller-level etag additions that will be part of the action etag computation *Jeremy Kemper/DHH*
-