开发者

Should I cache the XRDS file returned in openid?

开发者 https://www.devze.com 2022-12-29 13:30 出处:网络
In the initial part of the openid sequence, I request the OP (开发者_Python百科e.g. Yahoo.com) and get back the XRDS file which tells me the actual URL I need to use for the rest of the openid process

In the initial part of the openid sequence, I request the OP (开发者_Python百科e.g. Yahoo.com) and get back the XRDS file which tells me the actual URL I need to use for the rest of the openid process. So, can I cache this initial file. E.g. if I have hundreds of users using a Yahoo openid, I would only have to do the initial fetch once every hour?


Yes, the OpenID spec does not forbid discovery caching, and most OpenID-enabled sites do just that. Of course the duration you cache discovery results should be balanced between speed, memory consumption and stale data.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号