1:
2:
3: /*********************
4: * *
5: * PROJECT INCLUDES *
6: * *
7: *********************/
8:
9:
10: /****************
11: * *
12: * METHODS GET *
13: * *
14: ****************/
15:
16:
17: inline ResponsePtr RRCache::Get(const char *i_strName, RRType i_rrType, RRClass i_rrClass) {
18: LabelListPtr llp = new LabelList(i_strName);
19: ResponsePtr rsp;
20: rsp = this->Get(llp,i_rrType,i_rrClass);
21: SoftDelete(llp);
22: return rsp;
23: }
24:
25:
26: inline ResponsePtr RRCache::Get(QuestionConstPtr ci_qnp) {
27: return this->Get(ci_qnp->GetName(),ci_qnp->GetType(),ci_qnp->GetClass());
28: }
29:
30:
31: /*********************
32: * *
33: * METHOD GETSIMPLE *
34: * *
35: *********************/
36:
37:
38: inline RRListPtr RRCache::GetSimple(const char *i_strName, RRType i_rrType, RRClass i_rrClass) {
39: LabelListPtr llp = new LabelList(i_strName);
40: RRListPtr rlp;
41: rlp = this->GetSimple(llp,i_rrType,i_rrClass);
42: SoftDelete(llp);
43: return rlp;
44: }
45:
46:
47: /*************************
48: * *
49: * METHOD SETMAXENTRIES *
50: * *
51: *************************/
52:
53:
54: inline void RRCache::SetMaxEntries(unsigned i_uMaxEntries) {
55: LogHandle lh(LF_CACHE,LY_INFO);
56: lh << "cache maxentries set to " << i_uMaxEntries << endl;
57: m_uMaxEntries = i_uMaxEntries;
58: }
59:
60:
61: /*************************
62: * *
63: * METHOD SETNEXTEXPIRE *
64: * *
65: *************************/
66:
67:
68: inline void RRCache::SetNextExpire(time_t i_tmWhenExpire) {
69: m_tmNextExpire = i_tmWhenExpire;
70: }
71:
72:
73: