brightin / brightcontent

BrightContent, yet another cms / admin panel for Rails
brightin.nl
MIT License
12 stars 13 forks source link

PageSupport#set_page makes a lot of queries #12

Closed jvdp closed 10 years ago

jvdp commented 13 years ago

Page.all.detect{|p| p.url == path} generates a lot of queries on every request (though most cached.)

tlray commented 13 years ago

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.