Discussions

News: OpenSymphony Announces OSCache 2.0 Beta

  1. OpenSymphony Announces OSCache 2.0 Beta (7 messages)

    We're pleased to announce that a beta of OSCache 2.0 is now available. OSCache is a high performance J2EE caching solution that can cache portions of JSP pages, entire HTTP responses (including dynamically generated images), and of course arbitrary Java objects.

    There are many improvements over the 1.7.5 release. Some of the key new features include:

    - support for grouping of cache entries
    - entries or groups can now be flushed according to cron expressions
    - caches can be distributed across a cluster
    - much improved cache configuration
    - overhauled documentation
    - plus many bugs have been fixed.

    Links:

    Download OSCache 2.1

    OSCache Change Log

    See the OSCache Homepage to find out more about what OSCache has to offer.

    Threaded Messages (7)

  2. Open Source Caching Tools[ Go to top ]

    Can someone who has experieince with OSCache and/or JCS weigh in on the differences and advantages of the two? Specifically, ease of configuration, documentation, etc. I do't want to start a flamewar about speed. Obviously, caching will result in a significant speed increase for most applications so arguing about tenths of milliseconds difference between JCS and OSCache in ultra-specific instances isn't useful.

    I was under the impression that OSCache was mainly for JSP caching, but it appears that it can cache arbitrary objects. Does anyone have anything they can relate about this?
  3. Open Source Caching Tools[ Go to top ]

    No experience with JCS but some experience with OScache.

    OSCache can cache arbitrary objects.I use it within the controller of a Struts application to cache and retrieve arbitrary object.

    Powerfull and easy to use.

    Rgds,Claude
  4. Open Source Caching Tools[ Go to top ]

    I was under the impression that OSCache was mainly for JSP caching, but it appears that it can cache arbitrary objects


    Unfortunately your misconception is a common one. Even though OSCache was originally designed as a JSP caching solution, it is definitely able to cache arbitrary Java objects. The problem is that up until this release the documentation has never mentioned that minor detail! Hopefully the documentaion (including the JavaDocs) is much improved now, however please let me know if there's anything else you'd like to see covered or clarified. We've also made some big improvements to the configuration in version 2.0 so it should be very easy to configure either programmatically or via the oscache.properties file.

    The easiest way to cache arbitrary objects with OSCache is to just use the GeneralCacheAdministrator class. If you need more control than that, it's fairly easy to write your own administrator class that extends AbstractCacheAdministrator (eg we do this in an application to add some special handling for a custom CacheKey class). About the only thing you need to remember is that your cached objects must be serializable if you intend to use the disk caching.

    I can't give you a very good comparison to JCS unfortunately since most of my experience is with using (and more recently, developing) OSCache. There's obviously quite a bit of overlap with the two projects, but if you have a look at the documentation of both projects I'm sure you'll see plenty of differences too. Try them both :-)
  5. Hi Chris,

    I gave the javadocs a quick scan but couldn't find cache-invalidation hooks? Is there anything available to (for instance) hook it up with the JBoss cache-invalidation framework?

    cheers,

    Joost
  6. Joost,

    I'm not familiar with JBoss so I'm not quite sure what you're after here. Are you talking about catching an event from JBoss and invalidating the cache based on that? If so you'd have to write something yourself that caught the event and then flushed the cache as appropriate, but that shouldn't be too difficult.

    If you're talking about catching an OSCache flush event, then yes you can do that - take a look at the CacheEntryEventListener interface.

    Note that the javadocs that are online are still the 1.7.5 docs. I should have them updated to the 2.0 docs shortly - in the meantime you'll have to refer to the javadocs from the distribution.
  7. Object caching[ Go to top ]

    This article discusses object caching:

    http://www.onjava.com/pub/a/onjava/2003/12/23/caching.html
  8. Can we compare EHCache with OSCache?[ Go to top ]

    Hi Chris,
    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 List if possible.
    Thanks and regards,
    Nitin