Bugs: Browse | Submit New | Admin
If finder SQL puts backticks around the primary key, or if the 'LIMIT 1' clause is not included in the finder SQL, then CachedModel 1.3.1 doesn't hit the cache. Changing the regex to the line below would fix these problems. return super unless args.first =~ /^SELECT \* FROM #{table_name} WHERE \(#{table_name}\.`?#{primary_key}`? = '?(\d+)'?\)( +LIMIT 1)? *$/
Add A Comment: