1 package App::Commentry::CommentStore;
3 use aliased 'App::Commentry::CommentSet';
6 has base_dir => (is => 'ro', required => 1);
8 has _cache => (is => 'ro', default => sub { {} });
11 my ($self, $proto) = @_;
12 my $path = $proto->{path} or die "->get requires a path key";
13 $self->_cache->{$path} ||= do {
14 CommentSet->new(base_dir => $self->base_dir, path => $path)