Created
November 30, 2017 05:30
-
-
Save wolframite/ee23b08bdd26bc1284cacc5259b850f8 to your computer and use it in GitHub Desktop.
Apache Ignite Redis Store > 8kb values bug demonstration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$redis = new Redis(); | |
$redis->connect('localhost', 6380); | |
$valueSize = 10000; | |
$key = 'x'; | |
$value = str_repeat($key, $valueSize); | |
$result = $redis->set($key, $value); | |
printf("%s%s", $result === true ? "Setting key was successful" : "Setting key failed", PHP_EOL); | |
$retrievedResult = $redis->get($key); | |
if ($retrievedResult === false) { | |
echo "Fetching key failed" . PHP_EOL; | |
} else { | |
printf('Key successfully retrieved, length: %d%s', strlen($retrievedResult), PHP_EOL); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment