我应该缓存在openid中返回的XRDS文件吗? [英] Should I cache the XRDS file returned in openid?

查看:99
本文介绍了我应该缓存在openid中返回的XRDS文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在openid序列的开始部分,我请求OP(例如Yahoo.com)并取回XRDS文件,该文件告诉我在其余openid过程中需要使用的实际URL.因此,我可以缓存该初始文件.例如.如果我有数百个用户在使用Yahoo openid,那么我每小时只需要进行一次初始提取?

In the initial part of the openid sequence, I request the OP (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?

推荐答案

是的,OpenID规范不禁止发现缓存,并且大多数启用了OpenID的站点都这样做.当然,缓存发现结果的持续时间应该在速度,内存消耗和陈旧数据之间取得平衡.

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.

这篇关于我应该缓存在openid中返回的XRDS文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆