We can improve the performance of HttpSessionSecurityContextRepository by tracking if a value has been saved already or not.