Manage cookies that are used for advertising, such as ad personalization, remarketing, and ad effectiveness analysis.
2.8.1.5. Redis test
Ordering and setting up the extra service is described in Redis.
Attention!
If the Redis script needs to be run from console or via cron, then the path tophp.ini of one of the hosting account sites must be specified in the run command. For more information, see Run scripts that require ionCube, Zend Encoder, Memcache(d) or Redis.
To test the operation of Redis, you can run this script:
<?php
$mydir = explode('/', __DIR__);
$redis = new Redis();
$redis->connect("/home/$mydir[2]/.system/redis.sock");
if (!$redis->get('int') && !$redis->get('string') && !$redis->get('another_string')) {
$redis->set('string', 'variables were set at ' . date('F'));
$redis->set('int', date('d'));
$redis->set('another_string', date('G') . ":" . date('i'));
}
echo $redis->get('string') . " " . $redis->get('int') . ", " . $redis->get('another_string') . "<br>";
var_dump($redis->get('int'));
var_dump($redis->get('string'));
var_dump($redis->get('another_string'));
?>
At the first run, the script writes the current date to Redis and displays it on the screen. On next launches, the script displays the same date read from Redis.
(3)