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

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

问题描述

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

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.

有没有人对 GWT 中的客户端缓存有任何经验?是否有可以实施的标准方法?

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

推荐答案

我建议你查看 gwt-presenterCachingDispatchAsync .它提供了执行远程命令的单一入口点,因此是缓存的绝佳机会.

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天全站免登陆