{"ScriptPreparationCode":"var unix = 1724409214;","TestCases":[{"Name":"getRoundedDate","Code":"moment(new Date()).add(5, \u0027minutes\u0027).toISOString().slice(0, -11)","IsDeferred":false},{"Name":"ttlSec","Code":"moment().add(3600, \u0027s\u0027).utc().toISOString()","IsDeferred":false},{"Name":"getTtlFromKey","Code":"const cacheDurationMinutes = 60;\r\nconst defaultTtl = cacheDurationMinutes * 60;\r\nconst effectiveDate = \u00272025-07-18T18\u0027;\r\nconst now = moment.utc();\r\nconst keyEffectiveDateStart = moment.utc(effectiveDate);\r\nconst keyEffectiveDateEnd = keyEffectiveDateStart.clone()\r\n.add(cacheDurationMinutes, \u0027minutes\u0027);\r\nconst secondsTillKeyEnd = keyEffectiveDateEnd.diff(now, \u0027seconds\u0027);\r\n\r\nconst res = Math.min(defaultTtl, Math.max(0, secondsTillKeyEnd)) || defaultTtl;","IsDeferred":false}]}