1. 07 10月, 2015 2 次提交
  2. 04 10月, 2015 1 次提交
  3. 02 9月, 2015 1 次提交
  4. 28 8月, 2015 3 次提交
  5. 25 8月, 2015 1 次提交
  6. 16 6月, 2015 1 次提交
    • A
      remove `header=` on the response object. · 50176b59
      Aaron Patterson 提交于
      People should be free to mutate the header object, but not to set a new
      header object.  That header object may be specific to the webserver, and
      we need to hide it's internals.
      50176b59
  7. 14 1月, 2015 1 次提交
  8. 16 6月, 2014 1 次提交
    • M
      Change Http::Cache::SPECIAL_KEYS from Array to Set · e3123815
      Mindaugas Mozūras 提交于
      Slightly improves performance, for example, a simple benchmark:
      
      ```ruby
      require 'benchmark/ips'
      require 'set'
      
      SPECIAL_KEYS = %w[extras no-cache max-age public must-revalidate]
      SPECIAL_KEYS_SET = Set.new(SPECIAL_KEYS)
      directive = 'must-revalidate'
      
      Benchmark.ips do |x|
        x.report('array') { SPECIAL_KEYS.include?(directive) }
        x.report('set') { SPECIAL_KEYS_SET.include?(directive) }
      end
      ```
      
      Output:
      
      ```
      -------------------------------------
         array     67926 i/100ms
           set     74054 i/100ms
      -------------------------------------
         array  2318423.4 (±2.8%) i/s -   11615346 in   5.014899s
           set  3387981.8 (±4.7%) i/s -   16958366 in   5.019355s
      ```
      e3123815
  9. 19 3月, 2013 1 次提交
  10. 15 9月, 2012 3 次提交
  11. 03 8月, 2012 1 次提交
  12. 30 7月, 2012 1 次提交
  13. 19 6月, 2012 1 次提交
    • J
      Ensure that cache-control headers are merged · 0b4e8c8d
      James Tucker 提交于
      There are several aspects to this commit, that don't well fit into broken down
      commits, so they are detailed here:
      
       * When a user uses response.headers['Cache-Control'] = some_value, then the
         documented convention in ConditionalGet is not adhered to, in this case,
         response.cache_control is ignored due to `return if
         self[CACHE_CONTROL].present?`
       * When a middleware sets cache-control headers that would clobber, they're
         converted to symbols directly, without underscores. This would lead to bugs.
       * Items that would live in :extras if set through expires_in, are placed
         directly in the @cache_control hash, and not respected in many cases
         (somewhat adhering to the aforementioned documentation).
       * Although quite useless, any directive named 'extras' would be ignored.
      
      The general convention applied is that expires_* take precedence, but no longer
      overwrite everything and expires_* are ALWAYS applied, even if the header is
      set.
      
      I am still unhappy about the contents of this commit, and the code in general.
      Ideally it should be refactored to no longer use :extras. I'd likely recommend
      expanding @cache_control into a class, and giving it the power to handle the
      merge in a more efficient fashion. Such a commit would be a larger change that
      could have additional semantic changes for other libraries unless they utilize
      expires_in in very standard ways.
      0b4e8c8d
  14. 08 12月, 2011 1 次提交
  15. 31 10月, 2011 1 次提交
  16. 10 5月, 2011 1 次提交
  17. 18 1月, 2011 1 次提交
  18. 18 10月, 2010 1 次提交
  19. 04 10月, 2010 1 次提交
  20. 12 8月, 2010 1 次提交
  21. 29 6月, 2010 1 次提交
  22. 28 3月, 2010 1 次提交
  23. 20 2月, 2010 1 次提交
  24. 16 1月, 2010 1 次提交