OSCache与EHCache [英] OSCache vs. EHCache

查看:109
本文介绍了OSCache与EHCache的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

之前从未使用过像这样的缓存。问题是我想从数据库中加载500,000条记录并快速选择/过滤恶意。

Never used a cache like this before. The problem is that I want to load 500,000 + records out of a database and do some selecting/filtering wicked fast.

我正在考虑使用缓存,并初步找到 EHCache OSCache ,任何意见?

I'm thinking about using a cache, and preliminarily found EHCache and OSCache, any opinions?

推荐答案

它们都是非常可靠的项目。如果您有非常基本的缓存需求,其中任何一个都可能与另一个一样好。

They're both pretty solid projects. If you have pretty basic caching needs, either one of them will probably work as well as the other.

您可能还希望考虑在数据库查询中进行过滤这是可行的。通常,使用返回较小结果集的调优查询将比向内存中加载500,000行然后过滤它们提供更好的性能。

You may also wish to consider doing the filtering in a database query if it's feasible. Often, using a tuned query that returns a smaller result set will give you better performance than loading 500,000 rows into memory and then filtering them.

这篇关于OSCache与EHCache的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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