Feature #215
[Patch] Static pages controller
| Status : | Closed | Start : | ||
| Priority : | Normal | Due date : | ||
| Assigned to : | - | % Done : | 0% |
|
| Category : | - | |||
| Target version : | - | |||
| Resolution : | fixed |
Description
Here's my take on a mechanism for static pages. It seems a bit cheesy but simple.
Just unpack into app/ It consists of a controller and a view. The controller reads one parameter, a document id/name. The view uses the document name as the name of a partial and simply calls render_partial with it.
Associated revisions
Add pagination for article admin pages. (closes #215)
More article admin pagination. closes #215
History
04/05/2005 03:22 AM - Redmine Admin
Sorry, forgot the route. Add
map.connect 'static/:id', :controller => 'static', :action => 'index'
to routes.rb
05/20/2005 05:11 PM - wesley-moxam-gmail-com -
I implemented static pages by using the rails 'caches_page' method. Then I modified the dispatcher so that if it found a static page it would serve it, otherwise it would load the rails libs and execute as normal. This boosts the speed by a lot for blogs running under plain old cgi since loading the libs is slow.
I've attached the code (it's quite simple). Sorry that it's not in diff format, but it is easy enough to figure out where it should go.
One thing that it doesn't do is expire cached pages when flickr, del.icio.us, etc content changes. A way to deal with it would be to write something that deletes the cache, then visits all of the pages in the blog, and then schedule it via cron.
06/20/2005 07:12 AM - scoop -
- Status changed from New to Closed
- Resolution set to duplicate
Superceded by #127
07/18/2005 02:12 PM - tobi -
- Resolution set to fixed
(In r337) typo is now full static. The entire front end comes from static pages which are swept on commenting, trackbacks, new article posts and category changes.
This means we cannot do the "posted 25 minutes ago" business but we can easily serve in excess of 1k pages per second so this should be worth it.
