Getting Started
Access Instance

Access Instance

For security reasons, UMem Redis instances can only be accessed via the internal network. The following briefly describes how to access UMem storage using the Redis protocol.

telnet access

[test@u205 ~]$ telnet 6379
Connected to
Escape character is '^]'.
set key value
get key
del key

php access

    $redis = new Redis();
    $redis->connect('', 6379);
    $key = "testkey";
    $tvalue = "testvalue";
    $redis->set($key, $tvalue);
    $nvalue = $redis->get($key);
    print_r($nvalue . "\n");

Python access

#!/usr/bin/env python2
# coding=utf8
import sys, os
import redis
if __name__ == "__main__":
    ip = ''
    port = 6379
    r = redis.StrictRedis(ip, port, 0)
    key = 'testkey'
    tvalue = "testvalue"
    r.set(key, tvalue)
    nvalue = r.get(key)
    print nvalue
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved
  • Contact our sales to help your business.
  • Contact our sales to help your business.