Subject: | problem with hget (hmget) and stash |
When running this code several times "stash(text3)" first time appearing normal.
Then value of all fields (test1, test2, test3) changed. Value of text1 and text2
changing normal. Value of stash(text3) will change only after reloading the page
(F5 or Ctrl-R). The same problem when I try to get value of test1, test2, test3 from
hget('111', test1);
my $redis = MojoX::Redis->new(server => '127.0.0.1:6379');
$redis = $redis->ioloop(Mojo::IOLoop->new);
$redis->hmget('111', 'test1', 'test2' , 'test3' => sub {
my ($redis, $res) = @_;
$data_out1 = $res->[0];
$data_out2 = $res->[1];
$data_out3 = $res->[2];
print $data_out3->[0]; #for check up that it's not Mojolicious fault
$redis->stop;
});
$redis->start;
$self->stash(text1 => $data_out1->[0]);
$self->stash(text2 => $data_out2->[0]);
$self->stash(text3 => $data_out3->[0]);
$redis->quit;
So I suggest is it problem of MojoX::Redis. Sorry for poor English. Let me know if
you have any misunderstanding (объясню по-русски).
#uname -a
Linux 2.6.33 i686 zenwalk.org
#perl -v
5.10.1
#mojolicious version
1.64 (running as daemon)
#mojox::redis version
0.81
#redis version
2.2.12
#browsers version
opera 10.60
icecat 3.6.3