dotnet/aspnetcore
GitHub で見るLoadAsync on Session - when _isNewSessionKey is true
Open
#20,898 opened on 2020年4月16日
Perfaffected-fewarea-middlewarebreaking-changeenhancementhelp wantedseverity-nice-to-have
Repository metrics
- Stars
- (37,933 stars)
- PR merge metrics
- (平均マージ 16d 9h) (30d で 258 merged PRs)
説明
Should Load/LoadAsync be a no-op when _isNewSessionKey is true. Taking the advice to call LoadAsync prior to accessing the session with get/trygetvalue/set I would of thought we'd guard against unnecsssary chitchat to the cache if we know the session is new?
I though about doing Request.Cookies["sesscoookie"] != null then await LoadAsync but then doing Get/Set/Id/IsAvailable will simply call load anyway if not _loaded isnt marked.