Commit Graph

22 Commits

Author SHA1 Message Date
Frank Denis f2484f5bd5 Cache plugin: replace ARC cache with SIEVE 2024-01-19 00:05:33 +01:00
Frank Denis acc25fcefb Format with gofumpt 2023-02-11 14:27:12 +01:00
Frank Denis df3fb0c9f8 Keep lines short
$ golines -w -m 120 --shorten-comments .
2022-03-23 17:48:48 +01:00
Frank Denis efcd392279 StaleResponseTtl -> StaleResponseTTL 2021-09-27 15:47:19 +02:00
Frank Denis e5608e08cf Define a constant for the TTL of stale responses 2021-09-25 19:53:25 +02:00
livingentity 2a3e59c4bf
Update plugin_cache.go (#1900) 2021-09-25 19:04:17 +02:00
Frank Denis 75e917ae49 plugin_cache: update the response TTL, not the cached data
Fixes #1895
2021-09-23 18:37:40 +02:00
Frank Denis f9ec0a9c09 Deep copy cached responses 2021-01-03 17:37:19 +01:00
Frank Denis f34d7b60fa Implement serve-stale 2020-01-30 13:15:29 +01:00
Frank Denis 4fd54a4919 Store the normalized qName in the plugin state
We now enforce the fact that a query always include a question.
It holds true for all practical use cases of dnscrypt-proxy.

This avoids quite a lot of redundant code in plugins, and is faster.
2019-12-17 10:11:41 +01:00
Frank Denis 3e5dbee75a We don't need to store local copies of cachedResponses 2019-11-28 22:34:02 +01:00
Frank Denis 1152491b2d Move PluginCache before PluginCacheResponse 2019-11-24 09:14:36 +01:00
Frank Denis 3ddb134190 Reduce contention 2019-10-21 18:50:20 +02:00
Ferdinand Holzer 14b464e56d Log whether response was served from cache 2019-05-28 23:14:28 +02:00
Frank Denis 8b608403b1 Do not cache truncated messages
Fixes #774
2019-04-01 08:19:26 +02:00
Frank Denis b1447160a0 Add cache_neg_min_ttl and cache_neg_max_ttl 2018-04-17 00:24:49 +02:00
Frank Denis ebe41535ba Format 2018-02-09 22:40:29 +01:00
Amit 65dfa8ecca Cache Plugin: return non-fixed TTL for cached entries (refactor) 2018-02-09 22:11:12 +02:00
Amit 2a6a1852f1 Cache Plugin: return non-fixed TTL for cached entries 2018-02-09 17:59:04 +02:00
Frank Denis f6571af24f Nits 2018-01-31 08:38:22 +01:00
Frank Denis d7b8217018 Only cache specific Rcodes 2018-01-22 11:19:57 +01:00
Frank Denis 0dcf2c9e06 Split plugins into individual files 2018-01-16 18:21:17 +01:00