我正在编写一个将对象存储在缓存中的asp.net应用程序.当页面第一次加载时,它会检查对象的缓存,如果有,它将使用该对象.如果该对象不存在,它将重新构建它并将其存储在缓存中.由于多个用户可以同时使用此应用程序,我试图将对象存储在缓存中,缓存键为SessionID.好吧,我注意到当页面回发时,sessionID发生了变化,所以我需要使用不同的唯一键.有什么建议?我正在考虑使用登录人员的userID,但这也不是唯一的,因为您可以多次使用相同的ID登录.
我正在使用 Microsoft Graph 创建一个event
. 一切正常,除了它总是以 UTC 创建事件。我正在遵循文档中的示例,但仍然没有运气。
这是帖子的正文:
{
"subject": "My event",
"start": {
"dateTime": "2017-11-03T04:14:31.883Z",
"timeZone": "Eastern Standard Time"
},
"end": {
"dateTime": "2017-11-10T05:14:31.883Z",
"timeZone": "Eastern Standard Time"
}
}
Run Code Online (Sandbox Code Playgroud)
这是回应:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('...')/events/$entity",
"@odata.etag": "W/\"1OZnj8JcDU6yRK1K4rYSNQABJ3X/lw==\"",
"id": "...",
"createdDateTime": "2017-11-03T04:15:13.7075368Z",
"lastModifiedDateTime": "2017-11-03T04:15:13.7231636Z",
"changeKey": "1OZnj8JcDU6yRK1K4rYSNQABJ3X/lw==",
"categories": [],
"originalStartTimeZone": "UTC",
"originalEndTimeZone": "UTC",
"iCalUId": "...",
"reminderMinutesBeforeStart": 15,
"isReminderOn": true,
"hasAttachments": false,
"subject": "My event",
"bodyPreview": "",
"importance": "normal",
"sensitivity": "normal",
"isAllDay": false,
"isCancelled": false,
"isOrganizer": true,
"responseRequested": true,
"seriesMasterId": null, …
Run Code Online (Sandbox Code Playgroud)