cache 0.0.3

D language universal object cache library. include memory、redis、memcached、rocksdb


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Build Status

UCache

D language universal cache library.

Support drivers

  • memory
  • memcache
  • redis
  • rocksdb

tips

default support memory、memcache、redis.

example

struct Student
{
	ulong 		ID;
	string 		name;
	string		address;
}

class Grade
{
	int 		gradeLevel;
	string  	gradeName;
	Student[]	arrStu;
}

auto cache = UCache.CreateUCache();

//string
cache.put!string("test" , "test");
string val = cache.get!string("test");

//student.
Student stu1;
stu1.ID = 1;
stu1.name = "tom";
stu1.address = "Tianlin Road 1016";
cache.put!Student("tom" , stu1);
auto stu = cache.get!Student("tom");

//Grade
Grade grade = new Grade();
grade.gradeLevel = 12;
grade.gradeName = "13";
grade.arrStu ~= stu1;
cache.put!Grade("13" , grade);
auto grade1 = cache.get!Grade("13");


Authors:
  • zhangyuchun
Dependencies:
kiss
Versions:
0.0.3 2018-May-03
0.0.2 2018-Apr-17
0.0.1 2018-Mar-28
~master 2018-May-03
Show all 4 versions
Download Stats:
  • 2 downloads today

  • 25 downloads this week

  • 61 downloads this month

  • 74 downloads total

Score:
1.4
Short URL:
cache.dub.pm