Overview
Both Oscache and Ehcache are process-level caches, and this article explains the features and differences between the two frameworks.
Oscache
Oscache now no longer maintenance, but can be downloaded to use, it can cache the page, can achieve the entire page cache, can also implement the page it can cache data objects, for the page cache, we need to note: the same browser, access to the same page multiple times, will only access the business logic layer, Different browsers, accessing the same page multiple times, each browser accesses the business logic layer separately. Oscache cache for persistent functionality.
Demo download
Ehcache
Ehcache Framework uses a relatively broad, hibernate two cache is the framework used, the framework can also cache the entire page, the cache is more perfect than Oscache, different browser access is also cached. The Ehcache cache allows for persistence.
Demo download
SummaryIn the Oscache demo, we also do a simple application in the implementation of the function, is to query the database so that the existence of data in the cache, the direct access to data, does not exist, taken from the database, placed in the cache, and returned to the user.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Java Cache (3, Oscache, and Ehcache)