this repo has no description

Making sure all keys are saved as strings instead of ints so we don't try to pass a number in a string when it was saved as an integer

Changed files
+3 -3
lib
CHI
Driver
+3 -3
lib/CHI/Driver/MongoDB.pm
··· 36 36 sub fetch { 37 37 my ( $self, $key ) = @_; 38 38 39 - my $results = $self->collection->find_one( { _id => $key }, { data => 1 } ); 39 + my $results = $self->collection->find_one( { _id => "$key" }, { data => 1 } ); 40 40 return ($results) ? $results->{data} : undef; 41 41 } 42 42 43 43 sub store { 44 44 my ( $self, $key, $data ) = @_; 45 45 46 - $self->collection->save( { _id => $key, data => $data }, 46 + $self->collection->save( { _id => "$key", data => $data }, 47 47 { safe => $self->{safe} } ); 48 48 return; 49 49 } ··· 51 51 sub remove { 52 52 my ( $self, $key ) = @_; 53 53 54 - $self->collection->remove( { _id => $key }, { safe => $self->{safe} } ); 54 + $self->collection->remove( { _id => "$key" }, { safe => $self->{safe} } ); 55 55 return; 56 56 } 57 57