<p></p>
That does make sense (although I'm surprised it is hit ...<br>
EXCHANGE_LIFETIME defaults to 247 seconds, but yeah at 100 requests per<br>
second this hits 50-50 on reaching the cache after a reboot, and at 10/s<br>
it's still 4% by the back of the envelope).<br>
<br>
API-wise, I'd suggest a different approach though:<br>
<br>
gcoap could define an opaque type (OK no such thing in C, but say in the<br>
docs that the fields may change) describing its state, with a<br>
`gcoap_hibernate_dump(*type)` and a `gcoap_resume_from(const *type)`<br>
function. The type's content would depend on build flags, would always<br>
contain MIDs but possibly also token (making reboots unnoticable to<br>
those observing token values) and possibly DTLS or OSCORE resumption<br>
data later.<br>
<br>
Of course, if as Ben suggested it's all just about lack of randomness,<br>
then the same approach applies but to the RNG ;-)<br>


<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/16730#issuecomment-898607884">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYEYI3GACKLNUQ72NRTT4VHVZANCNFSM5CD4FYCQ">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email">Android</a>.<img src="https://github.com/notifications/beacon/ABE7WYAUBNVFQ5R4WKG7Y2DT4VHVZA5CNFSM5CD4FYC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGWH2WDA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/16730#issuecomment-898607884",
"url": "https://github.com/RIOT-OS/RIOT/pull/16730#issuecomment-898607884",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>