Closed jvdp closed 10 years ago
Page.all.detect{|p| p.url == path} generates a lot of queries on every request (though most cached.)
Yes, i am aware...
We could make a cache column 'url' which would solve this issue, or implement https://github.com/norman/friendly_id
Friendly_id has a cache option. It also support renames/301 redirects.
Page.all.detect{|p| p.url == path} generates a lot of queries on every request (though most cached.)