comment saving
[scpubgit/Commentry.git] / lib / App / Commentry / CommentStore.pm
index 6676cc4..64f31c1 100644 (file)
@@ -5,7 +5,11 @@ use Moo;
 
 has base_dir => (is => 'ro', required => 1);
 
-has _cache => (is => 'ro', default => sub { {} });
+has _cache => (
+  is => 'ro', init_arg => undef,
+  lazy => 1, default => sub { {} },
+  clearer => 'clear_cache'
+);
 
 sub get {
   my ($self, $proto) = @_;