Ehcache 1.0 released

Discussions

News: Ehcache 1.0 released

  1. Ehcache 1.0 released (7 messages)

    ehcache 1.0 has been released. Ehcache is a small, fast and simple in-process Java cache, available under an open source license.

    Ehcache is now one year old. In that time it has moved it has been incorporated into many projects and commercial software offerings including Hibernate, Spring, Apache Cocoon, Apache Turbine, Confluence and many others.

    It has both memory and disk stores. They are are scalable to hundreds of caches and gigabytes of storage. It is fully documented, has high test and has high test coverage.

    Ehcache deliberately emphasizes simplicity, safety and scalability over features. As such it is a departure from other efforts which seek to implement JSR107.

    Caching is a great way to speed up applications. Ehcache comes with extensive documentation on how to apply it to common problems such as Hibernate, web pages and search engines.

    Ehcache can be used in J2SE and J2EE. It works with JDK1.2 through to JDK5.

    Threaded Messages (7)

  2. Suppose I have the option to replace all my HttpSession access with such a cache. Can this provide any performance gain?
    Does anyone has any experience with that?
  3. I take it you mean storing things in the session and then picking them up on the next request.

    Using a cache gives you the advantage that multiple request threads can access the values in the cache, whereas session scope is limited to the next request in that session. Of course you could also use application scope.

    I don't use caching to replace that however. There seems to be a number of sweet spots in web apps: caching whole pages or page fragments, caching 'result sets' of value or domain objects, and utilising Hibernate caches.

    Ehcache acts as the default plugin for Hibernate.

    It contains constructs with documented examples for caching 'result sets' of value objects or domain objects.

    The BlockingCache is used for caching pages and page fragments. I currently use this from a PageCacheFilter and a PageFragmentFilter. This is such a common use that I plan to add these classes to the constructs package of ehcache.
  4. Suppose I have the option to replace all my HttpSession access with such a cache. Can this provide any performance gain?Does anyone has any experience with that?

    WebLogic Server has several ways of caching (read persisting) the user session like JDBC and File System which can achieve just what you want! Performance wise, I don't think because it increases the number of disk IO and/or network traffic. But looking at scalability a big YES. You are no longer limited to the amount of physical memory ($$$) available. Again, it depends upon your server configuration, network and I/O speed, network traffic, blah blah. In some cases increasing your server's physical memory may prove more feasible than providing an efficient alternative.

    Refer:
    http://e-docs.bea.com/wls/docs81/webapp/sessions.html#session-persistence
  5. Can we compare EHCache with OSCache?[ Go to top ]

    Hi,
    Can I get a Comparison ( Features and performance wise) of EHCache with OSCache.
    I am currently in an impression that OSCache can cache portions of JSP pages, which is nowhere documented in the case of EHCache.
    Also, I want a suggestion on which caching technique should i use, if I am not using Hibernate?
    My Object caching requirement can be both, in-memory and presistent.
    Please suggest the better option for me, along with the Comparison.
    Thanks and regards,
    Nitin
  6. take the best of each[ Go to top ]

    You can mix them.
    From OSCache, use all the classes from com.opensymphony.oscache.web.filter, and from ehcache, use it all. All you have to do is adapt the CacheFilter class a bit.
    EHCache is great, but I find no trace of the "concurrent" library (or the equivalent in Java 5). When you use a LinkedHashMap, a get() modifies the Map by changing the order of the elements, so it has to be totally synchronized.

    Olivier Allouch
  7. found it[ Go to top ]

    I just found where the concurrent was used (ehcache-constructs).
  8. Thanks[ Go to top ]

    Thanks Olivier,
    Your post came out, right when I had already decided to go for EHCache along with Hibernate. I'll see if I can correlate the two, and get the Best solution.

    Nitin