Last active
February 13, 2023 08:13
-
-
Save dmitry-udod/a6f391a7cda72f80fcef9f6e14d81a41 to your computer and use it in GitHub Desktop.
Cache TTL with time jitter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ttl = (int) (3600 + (mt_rand() / mt_getrandmax() * (60 * 2))); /* +/- 2 minutes */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment