diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bd11cc1..0903fdbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,11 +10,12 @@ and this project adheres to ## [Unreleased] ### Added +- Optimistic cache ([#2145]). - New possible value of `6h` for `querylog_interval` setting ([#2504]). - Blocking access using client IDs ([#2624], [#3162]). - `source` directives support in `/etc/network/interfaces` on Linux ([#3257]). @@ -53,11 +54,6 @@ and this project adheres to ### Deprecated - - - Go 1.16 support. v0.108.0 will require at least Go 1.17 to build. ### Fixed @@ -83,6 +79,7 @@ released by then. [#1381]: https://github.com/AdguardTeam/AdGuardHome/issues/1381 [#1691]: https://github.com/AdguardTeam/AdGuardHome/issues/1691 [#2141]: https://github.com/AdguardTeam/AdGuardHome/issues/2141 +[#2145]: https://github.com/AdguardTeam/AdGuardHome/issues/2145 [#2280]: https://github.com/AdguardTeam/AdGuardHome/issues/2280 [#2439]: https://github.com/AdguardTeam/AdGuardHome/issues/2439 [#2441]: https://github.com/AdguardTeam/AdGuardHome/issues/2441 diff --git a/client/src/__locales/en.json b/client/src/__locales/en.json index 8254c9ea..246f19c7 100644 --- a/client/src/__locales/en.json +++ b/client/src/__locales/en.json @@ -597,6 +597,8 @@ "cache_ttl_min_override_desc": "Extend short time-to-live values (seconds) received from the upstream server when caching DNS responses", "cache_ttl_max_override_desc": "Set a maximum time-to-live value (seconds) for entries in the DNS cache", "ttl_cache_validation": "Minimum cache TTL value must be less than or equal to the maximum value", + "cache_optimistic": "Optimistic", + "cache_optimistic_desc": "Make AdGuard Home respond from the cache even when the entries are expired and also try to refresh them.", "filter_category_general": "General", "filter_category_security": "Security", "filter_category_regional": "Regional", diff --git a/client/src/components/Settings/Dns/Cache/Form.js b/client/src/components/Settings/Dns/Cache/Form.js index 9a13ec63..5b0fe6a2 100644 --- a/client/src/components/Settings/Dns/Cache/Form.js +++ b/client/src/components/Settings/Dns/Cache/Form.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { Field, reduxForm } from 'redux-form'; import { Trans, useTranslation } from 'react-i18next'; import { shallowEqual, useSelector } from 'react-redux'; -import { renderInputField, toNumber } from '../../../../helpers/form'; +import { renderInputField, toNumber, CheckboxField } from '../../../../helpers/form'; import { CACHE_CONFIG_FIELDS, FORM_NAME, UINT32_RANGE } from '../../../../helpers/constants'; import { replaceZeroWithEmptyString } from '../../../../helpers/helpers'; @@ -47,27 +47,48 @@ const Form = ({ }) =>
- +
{t(description)}
)} - {minExceedsMax - && {t('ttl_cache_validation')}} + {minExceedsMax && ( + + {t('ttl_cache_validation')} + + )} + +
+
+
+ +
+