Deal with large numerical values in statistics - fixes #87
Change-Id: Iaaf95fe1dd6c87c693446706d2845a80bb2d257f
diff --git a/lib/Kalamar.pm b/lib/Kalamar.pm
index 9fb75f7..1e8b0c7 100644
--- a/lib/Kalamar.pm
+++ b/lib/Kalamar.pm
@@ -8,7 +8,7 @@
use List::Util 'none';
# Minor version - may be patched from package.json
-our $VERSION = '0.31';
+our $VERSION = '0.33';
# Supported version of Backend API
our $API_VERSION = '1.0';
@@ -146,15 +146,28 @@
$self->plugin($_);
};
+ my $serializer = 'JSON';
+
+ if (my $chi = $self->config('CHI')) {
+ if ($chi->{default}) {
+ $chi->{default}->{serializer} = $serializer;
+ };
+ if ($chi->{user}) {
+ $chi->{user}->{serializer} = $serializer;
+ };
+ };
+
# Global caching mechanism
$self->plugin('CHI' => {
default => {
driver => 'Memory',
- global => 1
+ global => 1,
+ serializer => $serializer
},
user => {
driver => 'Memory',
- global => 1
+ global => 1,
+ serializer => $serializer
}
});