Cache::FastMmap::Tie - Using Cache::FastMmap as hash


Cache-FastMmap-Tie documentation  | view source Contained in the Cache-FastMmap-Tie distribution.

Index


NAME

Top

Cache::FastMmap::Tie - Using Cache::FastMmap as hash

SYNOPSIS

Top

	use Cache::FastMmap::Tie;
	my $fc = tie my %hash, 'Cache::FastMmap::Tie', (
		share_file => "file_name",
		cache_size => "1k",
		expire_time=> "10m",
	);

	$hash{ABC} = 'abc'; # $fc->set('ABC', 'abc');
	$hash{abc_def} = [qw(ABC DEF)];
	$hash{xyz_XYZ} = {aaa=>'AAA',BBB=>[qw(ccc DDD),{eee=>'FFF'}],xxx=>'YYY'};

	print $hash{ABC}; # $fc->get('ABC');

	for ( keys %hash ) { # $fc->get_keys(0);
		print $hash{$_}, "\n"; # $fc->get($_);
	}

or Basic global parameter can also be obtained from a YAML file.

	my $cf = tie my %hash, 'Cache::FastMmap::Tie', {yaml_file=>'yaml.txt'}

It is the sample of the YAML file. (yaml.txt)

	expire_time: 1m
	cache_size: 10k







DESCRIPTION

Top

Tie for Cache::FastMmap. Read `perldoc perltie`

AUTHOR

Top

Yuji Suzuki <yuji.suzuki.perl@gmail.com>

LICENSE

Top

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Top

Cache::FastMmap


Cache-FastMmap-Tie documentation  | view source Contained in the Cache-FastMmap-Tie distribution.