二级缓存支持两周期访问。
现在我们来谈谈关于二级缓存的查询优化问题。
Now let us discuss the issue with the query optimization for the objects which are configured for second level cache.
例如,它不需要会话缓存,也不和任何二级缓存或查询缓存有交互。
For example, it doesn't have session cache, and nor does it interact with any second-level or query cache.
您可能还能够使用二级缓存等方法同时提高远缓存访问率和检索率。
You might also be able to use approaches like a two-level cache to improve both the remote cache hit rate and the retrieval rate.
由于磁盘很慢,它从二级缓存中获取数据的速度快于磁盘。
Because disks are slow, it is faster to get data from a level 2 cache than from the disk.
可对JPA提供商的二级缓存进行访问,如果缓存可用的话。
但是如果缓存可用,这一新api和相关注释会帮助管理二级缓存的内容。
But if a cache is available, this new API and associated annotations will help with managing the contents of the Level2 cache.
所以他们放弃了表现不仅通过降低时钟速度,而且还缩短了二级缓存。
So they dropped the performance not only by reducing the clock rate, but also by truncating the L2 cache.
额外的CPU、二级缓存量和内存,在特定用户负载下可提供更好的容量和响应时间。
The additional CPUs, amount of level two cache, and memory provided better capacity and response time at specific user loads.
JPA 2.0中标准化的其他功能包括二级缓存插件和查询提示(也称为访问意图)。
Other functions that are standardized in JPA 2.0 are a level 2 cache plug-in, as well as query hints (also known as access intents).
顺便说一下,针对第三方缓存实现,ApacheOpenJPA确实提供了二级缓存插件。
By the way, Apache OpenJPA does provide a Level2 cache plug-in with third party cache implementations available.
说明:如果在查询中使用预先抓取来获取二级缓存中的数据时,我们将无法解决上面提出的问题。
Note: The above issue resolution is not solvable if we are eagerly fetching the second level cached data in our query.
另一个新的JPA 2.0运行时更新提供了对JPA提供商的二级缓存的访问,如果缓存可用的话。
Another new runtime update for JPA 2.0 provides access to a JPA provider's Level2 cache, if a cache is available.
这就说明Hibernate也没有解决这个问题,从而表明我们不应该在查询中通过预先抓取来获得二级缓存中的对象。
Hibernate has no solution for the above issue. This in turn indicates that we should never use eager fetching in our query for second-level cached objects.
如果对department实体采取预先抓取,那么对于同样的department实例,纵使它位于二级缓存中,每次也都需要查询数据库。
If we try to eager fetch the department entity then for every fetch of same department the database is hit for department information even though it is available in our second level cache.
没有得到太多的技术,新的A系列的APU使用32纳米的制造工艺和每个处理器核心上的“CPU侧”的APU拥有自己的二级缓存1MB。
Without getting too technical, the new A-series APUs are made using a 32nm manufacturing process and each processor core on the "CPU side" of the APU has 1mb of its own Level 2 cache.
通过缓存常用查询数据从而避免频繁命中数据库,缓存二级缓存同样有助于提高高事务性应用程序(highly transactional applications)的性能。
Second level caching is also useful for improving performance of highly transactional applications by caching commonly queried data and avoiding frequently hitting the database.
通过缓存常用查询数据从而避免频繁命中数据库,缓存二级缓存同样有助于提高高事务性应用程序(highly transactional applications)的性能。
Second level caching is also useful for improving performance of highly transactional applications by caching commonly queried data and avoiding frequently hitting the database.
应用推荐