Skip to content
Snippets Groups Projects
Commit 6322cb1e authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

filling cache faster

parent 9407f951
No related branches found
No related tags found
2 merge requests!1904Development,!1903Resolve "Switch to redis cluster"
......@@ -42,14 +42,13 @@ class FillCache extends Command
$lastStatus = microtime(true);
while (true) {
$key = $this->getRandomString(rand(50, 100));
$value = $this->getRandomString(rand(1024, 1024*1000));
$value = $this->getRandomString(rand(1024*100, 1024*10000));
Cache::put($key, $value);
$writtenBytes += mb_strlen(Cache::get($key));
if(microtime(true) - $lastStatus > 1){
echo "Stored " . $this->formatBytes($writtenBytes) . "." . PHP_EOL;
$lastStatus = microtime(true);
}
usleep(5 * 1000);
}
return 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment