- Perform_caching is not respected by Rails.cache methods.
config.action_controller.perform_caching does not appear to affect the Rails.cache methods.
Rails 2.1 introduced a new custom caching mechanism:
result = Rails.cache.fetch('key') do # create and return item for this key end
It would be really nice if, for testing, you could set a configuration variable that would force a cache miss every time and always execute the block associated with the fetch. However it appears that, understandably, action_controller.perform_caching only affects the kinds of caching implemented by ActionController (page, action, fragment) and not this caching mechanism that is implemented by ActiveSupport::Cache::Store. Looking at the code, is appears there is no way to disable this caching mechanism other than supplying :force => true to the fetch call to force a cache miss.
- W3C refusing to serve DTDs to ‘misbehaving’ clients.
One of our applications that has not been deployed for a while is starting to see issues from IE users. After digging, we found this: W3C’s Excessive DTD Traffic and this w3.org DTD/xhtml1-strict.dtd blocks Windows IE users?. To summarize, w3.org got tired of getting slammed with non-cached DTD requests, and cut off misbehaving user agents (ones that do not cache the DTD). IE is one of these.
We have several things so far, none of which work:
Forcing xhtml DTD to be a SYSTEM dtd, and load the DTD files off the local server. This didn’t work – IE serve the pages as raw unrendered html (must
have thought it was XML?)
Use a PUBLIC doctype pointing to the DTD served on our server. Alas, this had the same problem as the SYSTEM doctype in #1 – raw unrendered HTML.
Not using XHTML (e.g. have as root tag). This didn’t work (haven’t
looked into why yet).
Ideas are welcome.
- Range#min, Range#max: Don’t use them. Use Range#first and Range#last. Min and max are not overridden by Range so fall back onto Enumerable which then converts the Range into an Array first!