Skip to content

Commit

Permalink
caching inline templates requires too much memory
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 1, 2014
1 parent ff47d9c commit aec221f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion Changes
@@ -1,7 +1,6 @@

5.36 2014-09-02
- Improved Mojo::Template performance.
- Improved performance of .ep templates.

5.35 2014-08-30
- Improved monkey_patch to be able to name generated functions.
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojolicious/Plugin/EPRenderer.pm
Expand Up @@ -2,7 +2,7 @@ package Mojolicious::Plugin::EPRenderer;
use Mojo::Base 'Mojolicious::Plugin';

use Mojo::Template;
use Mojo::Util qw(md5_sum monkey_patch);
use Mojo::Util qw(encode md5_sum monkey_patch);

sub DESTROY { Mojo::Util::_teardown(shift->{namespace}) }

Expand All @@ -22,7 +22,7 @@ sub register {
my $name = $options->{inline} // $renderer->template_name($options);
return undef unless defined $name;
my @keys = sort grep {/^\w+$/} keys %{$c->stash};
my $key = join(',', $name, @keys);
my $key = md5_sum encode 'UTF-8', join(',', $name, @keys);

# Prepare template for "epl" handler
my $cache = $renderer->cache;
Expand Down

0 comments on commit aec221f

Please sign in to comment.