MojoMojo

 view release on metacpan or  search on metacpan

lib/MojoMojo/Controller/Admin.pm  view on Meta::CPAN

    $user->update;
    $c->stash->{user} = $user;
}

=head2 precompile_pages

Make a formatted version of content body and store it in content.precompiled.
This makes MojoMojo go zing, when loading content for page requests.

Depending on the number of pages, and versions of them, this could take some minutes.
For 2000 page versions on a 2.4 GHz desktop this script took about 3 minutes to run.

=cut

sub precompile_pages : Global {
    my ( $self, $c ) = @_;

    my $content_rs = $c->model('DBIC::Content');
    while ( my $content_record = $content_rs->next ) {
        my $body = $content_record->body;
        next if !$body;



( run in 0.716 second using v1.01-cache-2.11-cpan-299005ec8e3 )