简体   繁体   English

ShieldUI缓存应用程序数据以供浏览器访问

[英]ShieldUI Caching application data for browser access

This is an ASP.Net MVC5 aplication. 这是ASP.Net MVC5应用程序。

We have a document archive for our customers. 我们有一个针对客户的文档档案。 Some customers have a rather large archive, up to 15,000 documents. 一些客户拥有相当大的存档,最多可容纳15,000个文档。 The data is retrieved from a web service and converted to JSON for use in our grid display. 数据是从Web服务中检索到的,并转换为JSON以在我们的网格显示中使用。

I am using ShieldUI Grid for displaying the list of documents. 我正在使用ShieldUI Grid显示文档列表。 I would like to somehow retrieve all their document, in the background and load the grid from that data store vs. having to load from our web service for each page. 我想以某种方式在后台检索他们的所有文档,然后从该数据存储中加载网格,而不必从我们的Web服务中为每个页面加载。

This makes the grid much easier to filter and sort because I don't have to make a round-trip to the server for the data. 这使网格更容易过滤和排序,因为我不必往返服务器获取数据。 Besides, the filtering only works with the current page, anyway. 此外,无论如何,筛选仅适用于当前页面。

The data for the customer with the largest number of documents, returned in JSON format is about 5.76MB (JSON string length approx 6,048,120 chars). 以JSON格式返回的文档数量最多的客户数据约为5.76MB(JSON字符串长度约为6,048,120个字符)。 Any thoughts on what to use to handle this type caching? 关于使用什么来处理这种类型的缓存有什么想法? Is 6MB too much to have the client handle the caching? 6MB太多了,无法让客户端处理缓存吗?

You can pre-fetch any amount of data and bind the grid to it. 您可以预取任意数量的数据并将网格绑定到该数据。 For example, you can assign the fetched data to a variable and bind the grid widget to it. 例如,您可以将获取的数据分配给变量,然后将网格小部件绑定到该变量。 In this example: http://demos.shieldui.com/web/grid-general/basic-usage the control is bound to a js file, but you can do the same to a local variable as well. 在此示例中: http : //demos.shieldui.com/web/grid-general/basic-usage控件绑定到js文件,但是您也可以对局部变量执行相同操作。 However, please keep in mind that this may not be the best option performance-wise - if there are too many records, it may be best to use remote databinding, for example, to improve the responsiveness of the component and the application. 但是,请记住,这可能不是最佳的性能选择-如果记录太多,则最好使用远程数据绑定,例如,以提高组件和应用程序的响应速度。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM