@tsteur thought of this possible optimization while checking the ttl change. Checks for visits from start time of last archive to end of period, and if not found, doesn't invalidate/archive. If you think it's worth finishing I can finish it.
Should only be applied to periods that include today (I think that's not the case currently in the PR, it also applies to yesterday, but it's WIP)...
- [ ] Functional review done
- [ ] Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
- [ ] Security review done see checklist
- [ ] Code review done
- [ ] Tests were added if useful/possible
- [ ] Reviewed for breaking changes
- [ ] Developer changelog updated if needed
- [ ] Documentation added if needed
- [ ] Existing documentation updated if needed