Caching web requests on Tomcat, Jetty and JBoss

Posted: May 31st, 2016 | Author: | Filed under: Java web cache

We come to developing Cacheonix web cache after having to ask ops for adding caching to Apache/Ngnx and never getting it. It was time to take matters back to dev hands. We wanted a zero-effort, ideally zero-conf, cache for the content generated by web apps. That’s how Cacheonix web cache came to be. All you need to do is to add Cacheonix to your project:

<dependency>
    <groupId>org.cacheonix</groupId>
    <artifactId>cacheonix-core</artifactId>
    <version>2.2.2</version>
<dependency>

and then add Cacheonix filter to web.xml and you are all set:

<filter>
    <filter-name>CacheonixWebCache</filter-name>
    <filter-class>org.cacheonix.cache.web.RequestCacheFilter</filter-class>
</filter>

...

<filter-mapping>
       <filter-name>CacheonixWebCache</filter-name>
       <url-pattern>*.htm</url-pattern>
</filter-mapping>

Zero-conf set up caches the request, automatically generates client cache headers If-Modified-Since and uses gzip compression if the client supports gzip compression.

Check out the docs for in-depth background and advanced configuration: http://wiki.cacheonix.org/display/CCHNX20/Cacheonix+Web+Cache

Let us know what you think.

(No) Comments: Post a response

You must be logged in to post a comment.