* @param {string} cacheKey * @return {string} * @package Visible for testing only.
(cacheKey)
| 5623 | * @package Visible for testing only. |
| 5624 | */ |
| 5625 | function cacheParam(cacheKey) { |
| 5626 | let period = CACHE_KEYS[cacheKey]; |
| 5627 | if (period == null) { |
| 5628 | period = 1; |
| 5629 | } |
| 5630 | if (period === 0) { |
| 5631 | return '_'; |
| 5632 | } |
| 5633 | const now = Date.now(); |
| 5634 | return String(period <= 1 ? now : Math.floor(now / period)); |
| 5635 | } |
| 5636 | |
| 5637 | /** |
| 5638 | * Copyright 2018 The Subscribe with Google Authors. All Rights Reserved. |