Cached user surveys have incorrect TTL
See original GitHub issueBug Description
The current implementation of the triggerSurvey
action does not set TTL when it caches the survey: https://github.com/google/site-kit-wp/blob/eea7808d8ab973561179d2d15d9fa327485aeb15/assets/js/googlesitekit/datastore/user/surveys.js#L109-L112
It means that all surveys are cached for an hour since it is the default value for the setItem
function.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- The
triggerSurvey
action should pass the providedttl
to thesetItem
function call to cache surveys for intended period of time.
Implementation Brief
- Add js tests to verify that the survey is cached for specified ttl.
- Merge #3656
Test Coverage
- N/A
Visual Regression Changes
- N/A
QA Brief
- Check the
triggerSurvey
action and verify that it correctly passes thettl
parameter to thesetItem
function call.
Changelog entry
- Add a configurable timeout to User Survey components.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Stop using ridiculously low DNS TTLs - APNIC Blog
If you use a local DNS cache such as dnscrypt-proxy that allows minimum TTLs to be set, use that feature. This is okay....
Read more >Hit-for-Miss AND why a NULL TTL is bad for you - Resources
A null TTL sounds like a good idea in theory... but also very wrong. In this post, we'll explore why it's a bad...
Read more >Route53 propagation time with ISPs not respecting TTL
I would like to have a possibility of redirecting traffic to other regions modifying Route53 rules and to be sure DNS failover policy...
Read more >What should I set the TTL for my DNS to?
As you already state in your question: a high TTL conflicts with a possible insecure mail server and a low TTL conflicts with...
Read more >Adaptive TTL-Based Caching for Content Delivery
(TTL)-based caching algorithms [8]–[13] use a TTL parameter to determine how long an object may remain in cache. TTL caches have emerged as...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@aaemnnosttv, yes we can add tests. IB is updated.
@eugene-manuilov this was already the case before but essentially relying on the default
ttl
rather than the one which was provided that was incorrect. The added test coverage should cover the scenario though 👍