Skip to content

Instantly share code, notes, and snippets.

@wolframite
Created November 30, 2017 05:30
Show Gist options
  • Save wolframite/ee23b08bdd26bc1284cacc5259b850f8 to your computer and use it in GitHub Desktop.
Save wolframite/ee23b08bdd26bc1284cacc5259b850f8 to your computer and use it in GitHub Desktop.
Apache Ignite Redis Store > 8kb values bug demonstration
<?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