hunt-cache 0.1.0
D language universal object cache library. include memory、redis、memcached、rocksdb
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
UCache
D language universal cache library.
Support drivers
- memory
- redis
- libmemcached
- rocksdb
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");
- Registered by zoujiaqing
- 0.1.0 released 6 years ago
- huntlabs/hunt-cache
- Apache-2.0
- Copyright (C) 2015-2018, HuntLabs.cn
- Authors:
- Dependencies:
- kiss
- Versions:
-
0.10.1 2021-Nov-16 0.10.0 2021-Oct-29 0.9.1 2021-May-27 0.9.0 2021-Jan-27 0.8.3 2021-Nov-15 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
26 downloads this month
-
2936 downloads total
-
- Score:
- 1.4
- Short URL:
- hunt-cache.dub.pm