Subject: | fastmmap driver does not properly handle cache_size param |
Date: | Mon, 12 May 2008 18:29:33 +0100 |
To: | bug-CHI [...] rt.cpan.org |
From: | Mike Astle <astle [...] lokku.com> |
I'm using CHI 0.07-1 on Debian (sarge) / GNU Linux (2.6.20).
I can't seem to create a FastMmap cache that is bigger than the default
size.
I know little of Moose, but I think that the cache_size, page_size, and
num_pages parameters to the FastMmap driver are getting dropped because
they are not in the list of things that the driver 'has'.
Suggested patch is below.
Thanks for CHI!
-mike
----
astle@dev-metrics:~/code/ext/lib/perl5/CHI/Driver$ diff -c FastMmap.pm
FastMmap.pm.new
*** FastMmap.pm 2008-05-12 18:26:35.000000000 +0100
--- FastMmap.pm.new 2008-05-12 18:27:35.000000000 +0100
***************
*** 13,18 ****
--- 13,21 ----
has 'dir_create_mode' => ( is => 'ro', isa => 'Int', default =>
oct(775) );
has 'fm_cache' => ( is => 'ro' );
has 'share_file' => ( is => 'ro' );
+ has 'cache_size' => ( is => 'ro' );
+ has 'page_size' => ( is => 'ro' );
+ has 'num_pages' => ( is => 'ro' );
has 'root_dir' => (
is => 'ro',
isa => 'Str',
----