orslumen/record-cache — pull request #18 by funkenblatt (2012-02-04 01:20:24+00:00)
Title: MySQL-specific table and column name quoting in AREL visitor

visit_Arel_Nodes_Grouping uses backticks when checking for quoted table and column names. PostgreSQL uses double-quotes, and other DBs may use other weird characters, which will cause record-cache to claim that such queries are not cacheable. I changed visit_Arel_Nodes_Grouping to delegate table and column-name quoting to the ActiveRecord connection's quoting methods.

Also while I was at it, I made the check for ASC or DESC in handle_order_by case insensitive. For most purposes this shouldn't be necessary, but we had some weird associations with hand-written order by clauses.