我可以缓存SP客户端对象模型返回的项目吗? [英] Can I cache the items returned by SP Client Object Model?

查看:75
本文介绍了我可以缓存SP客户端对象模型返回的项目吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了CamlQuery camlQuery = new CamlQuery()......和clientContext.ExecuteQuery();在我的Web应用程序根目录上,供用户查看列表中的某些项目.用户每次打开Web应用程序时,此CAML查询都需要花费时间来加载和显示.我可以用吗 在返回的项目上设置缓存,以便仅在特定时间间隔或缓存过期时设置为刷新?

I did CamlQuery camlQuery = new CamlQuery() ...... and clientContext.ExecuteQuery(); on my web app root for users to view certain items from lists. This CAML query takes time to load and display every time the user opens the web app. Can I use cache on the returned items to set like refresh only at a certain interval or if the cache expires?

谢谢

推荐答案

如果您使用的是c#,则可以基于以下条件使用服务器端缓存或客户端缓存您的详细要求.

对于客户端缓存,您可以使用ViewState /会话(这些用于当前用户).

http://stackoverflow.com/questions/2469035/data-caching-client-side-in -asp-net

http://stackoverflow.com/questions/2469035/data-caching-client-side-in-asp-net

对于服务器端缓存,您可以使用System.Web.Caching . 缓存

For server side cache, you could use System.Web.Caching.Cache(this is for all users).

https://msdn.microsoft.com/en-us/library/system.web.caching.cache(v = vs.110).aspx

https://msdn.microsoft.com/en-us/library/system.web.caching.cache(v=vs.110).aspx

最好的问候,

Lee


这篇关于我可以缓存SP客户端对象模型返回的项目吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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