GWT中的客户端缓存 [英] Client side caching in GWT

查看:123
本文介绍了GWT中的客户端缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个gwt-client,它从我们的服务器接收了大量的数据。从逻辑上讲,我想缓存数据在客户端,从服务器免受不必要的请求。



截至今天,我已经让我的模型来处理缓存的数据,这不能很好地扩展。这也成为一个问题,因为我们团队中的不同开发人员开发他们自己的缓存功能,使项目重复工作。



我在考虑如何实现一个单一入口点,它处理所有的缓存,使得模型对于如何处理缓存毫不知情。



有没有人有客户端缓存方面的经验? GWT?有没有一种标准的方法可以实现?

解决方案

我建议你看看 gwt-presenter CachingDispatchAsync 。它为执行远程命令提供了一个单一的入口点,因此为缓存提供了绝佳的机会。

A 最近的博客文章概述了一种可能的方法。


We have a gwt-client, which recieves quite a lot of data from our servers. Logically, i want to cache the data on the client side, sparing the server from unnecessary requests.

As of today i have let it up to my models to handle the caching of data, which doesn't scale very well. It's also become a problem since different developers in our team develop their own "caching" functionality, which floods the project with duplications.

I'm thinking about how one could implement a "single point of entry", that handles all the caching, leaving the models clueless about how the caching is handled.

Does anyone have any experience with client side caching in GWT? Is there a standard approach that can be implemented?

解决方案

I suggest you look into gwt-presenter and the CachingDispatchAsync . It provides a single point of entry for executing remote commands and therefore a perfect opportunity for caching.

A recent blog post outlines a possible approach.

这篇关于GWT中的客户端缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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