<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,27 +2,26 @@ role Cache;
 
 use Config;
 
-has $.cache_dir = Config.server_root ~ 'data/cache';
+method cache-dir {
+    return $.config.server_root ~ 'data/cache';
+}
 
 method set-cache-entry( $key, $value ) {
-    my $file = $.cache_dir ~ '/' ~ $key;
+    my $file = self.cache-dir ~ '/' ~ $key;
     my $fh = open( $file, :w );
-    say 'DOUBLE SETTING';
-    $fh.say( $value.perl );
-    say 'TRIPPLE SETTING';
+    $fh.say( $value );
     $fh.close;
 }
 
 method get-cache-entry( $key ) {
-    my $file = $.cache_dir ~ '/' ~ $key;
+    my $file = self.cache-dir ~ '/' ~ $key;
     return undef unless $file ~~ :e;
     my $string = slurp( $file );
-    my $stuff = eval( $string );
-    return $stuff;
+    return $string;
 }
 
 method remove-cache-entry( $key ) {
-    my $file = $.cache_dir ~ '/' ~ $key;
+    my $file = self.cache-dir ~ '/' ~ $key;
     return unless $file ~~ :e;
     unlink( $file );
 }</diff>
      <filename>lib/Cache.pm</filename>
    </modified>
    <modified>
      <diff>@@ -53,9 +53,6 @@ class November does Session does Cache {
             return;
         }
 
-        use $.config.markup;
-        my $markup = $.config.markup.new; # Text::Markup::Wiki::MediaWiki.new;
-
         # TODO: we need plugin system (see topics in mail-list)
         my $t = Tags.new;
 
@@ -67,6 +64,9 @@ class November does Session does Cache {
             $content = $cached_page;
         }
         else {
+            use $.config.markup;
+            my $markup = $.config.markup.new; # Text::Markup::Wiki::MediaWiki.new;
+
             $content = $markup.format($.storage.read_page( $page ),
                          link_maker    =&gt; { self.make_link($^p, $^t) },
                          extlink_maker =&gt; { self.make_extlink($^p, $^t)</diff>
      <filename>lib/November.pm</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e7d1a3076158721c4419768e8e9f1cf3843984be</id>
    </parent>
  </parents>
  <author>
    <name>Johan Viklund</name>
    <email>johan.viklund@gmail.com</email>
  </author>
  <url>http://github.com/viklund/november/commit/542438b05dda2cd2b3862248d5a21befdeb6eb34</url>
  <id>542438b05dda2cd2b3862248d5a21befdeb6eb34</id>
  <committed-date>2009-04-01T00:47:13-07:00</committed-date>
  <authored-date>2009-04-01T00:47:13-07:00</authored-date>
  <message>Caching of view_page implemented, ~30% speedup</message>
  <tree>9480b5991855a6565a4b1ae44f0db589e5441230</tree>
  <committer>
    <name>Johan Viklund</name>
    <email>johan.viklund@gmail.com</email>
  </committer>
</commit>
