Commit Graph

19 Commits

Author SHA1 Message Date
Tamás Gulácsi 6bbefe3f18 Add negative cache
Cache negative results, too, but only with half TTL, as configured.

Plus get rid of "mesg.Id = req.Id" data race (build with -race flag)
at once without locking.

Found another data race: delete must be protected with Lock,
RLock is not enough.
2015-02-13 07:05:12 +01:00
kenshinx ef7d8f8fa2 Remove mutex lock during call dns.ResponseWriter.WriteMsg
Write io buffer needn't mutex operation.
Refere to kenshinx/godns#1
2015-02-12 16:06:09 +08:00
kenshinx 8e504da15a Adaptive with IPV6 in hosts records. 2015-02-12 14:54:02 +08:00
kenshinx 81450a3983 Update hosts records as a regular interval
1. /etc/hosts will be update cycle instead of update once at the progress run
2. Avoid access redis in each requests
2015-02-12 14:09:49 +08:00
kenshinx f32122d875 Remove needless blank line 2015-02-11 17:11:32 +08:00
bigeagle d0f4170e35 only cache successful lookups 2015-02-05 19:38:42 +08:00
kenshinx 6e45ca722d Append some debug log 2015-02-04 14:37:48 +08:00
bigeagle ce840f4f50 add IPv6 support 2015-02-03 20:33:54 +08:00
Murilo Santana 82294d7f01 locks 2013-12-12 10:31:26 -02:00
kenshin 9ddf8a8939 finally. fix hosts query 2013-07-26 18:54:19 +08:00
kenshin d22885557f read local hosts file 2013-07-26 12:06:16 +08:00
kenshin 84d878c03d cache add expire strategy 2013-07-25 00:09:07 +08:00
kenshin f30e0ba257 add redid cache backend in todo list 2013-07-24 22:40:18 +08:00
kenshin 0dfc4bf100 refactor memory cache into map[string]dns.Msg 2013-07-24 19:01:31 +08:00
kenshin 51be27eee9 memory cache with map[string]string 2013-07-24 18:48:43 +08:00
kenshin 57304bf910 Memory cache implemented 2013-07-24 18:29:38 +08:00
kenshin 2d49200a53 exception handle 2013-07-24 10:52:59 +08:00
kenshin 22a31dcd98 The recursion resolve can work 2013-07-24 00:37:38 +08:00
kenshin 5349b53416 first commit 2013-07-23 19:10:38 +08:00