hunt-cache 0.4.1

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


To use this package, run the following command in your project's root directory:

Build Status

UCache

D language universal cache library.

Support drivers

  • memory
  • redis
  • libmemcached
  • rocksdb

# Versions

  • WITHHUNTREDIS
  • WITHHUNTMEMCACHE
  • WITHHUNTROCKSDB

tips

default support memory、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("test" , "test");
string val = cache.get("test");

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

//Grade
Grade grade = new Grade();
grade.gradeLevel = 12;
grade.gradeName = "13";
grade.arrStu ~= stu1;
cache.put("13" , grade);
auto grade1 = cache.get!Grade("13");
Dependencies:
hunt
Versions:
0.6.1 2019-Dec-09
0.6.0 2019-Nov-25
0.6.0-rc.4 2019-Nov-25
0.6.0-rc.3 2019-Oct-12
0.6.0-rc.2 2019-Sep-18
Show all 13 versions
Download Stats:
  • 2 downloads today

  • 18 downloads this week

  • 68 downloads this month

  • 955 downloads total

Score:
1.7
Short URL:
hunt-cache.dub.pm