Hunt Redis 1.0.0 release, D language Redis client

Hunt Redis using the D language development Redis client, very easy to use, API transfer from the Java industry's most easy to use Redis client project Jedis, compatible Redis 2.8.x / 3.x / 4.x / 5.x.

After a period of testing has now officially released 1.0.0 version, welcome experience, there is the example code below.

Basic features:

  • Sequence
  • Link Manager
  • Value of different types of command processing
  • String type of command processing
  • Hashes type of command processing
  • Lists the type of command processing
  • Sets the type of command processing
  • Sorted Sets the type of command processing
  • Affairs
  • Batch processing command
  • Pub /
  • Persistent control commands
  • Remote control commands
  • Fragment (MD5, MurmurHash)
  • Key-tags function cluster
  • Batch processing command cluster
  • Script batch command processing
  • Redis Cluster Support

Example of use:

import hunt.redis;

import std.stdio : writeln;

void main()
{
    auto redis = new Redis("localhost");

    redis.set("foo", "bar");

    string value = redis.get("foo");

    writeln(value); // 打印 bar
}

Redis Cluster uses examples:

import hunt.redis;

import std.stdio;

void main()
{
    auto redisClusterNodes = new HashSet!(HostAndPort)();

    redisClusterNodes.add(new HostAndPort("127.0.0.1", 7379));

    auto rc = new RedisCluster(redisClusterNodes);

    rc.set("foo", "bar");

    string value = rc.get("foo");

    writeln(value); // 打印 bar
}

 

Guess you like

Origin www.oschina.net/news/112025/hunt-redis-1-0-0-released