Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/realityforge/gwt-cache-filter
https://github.com/realityforge/gwt-cache-filter
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/realityforge/gwt-cache-filter
- Owner: realityforge
- License: apache-2.0
- Created: 2013-07-04T05:22:19.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-05-17T00:51:44.000Z (7 months ago)
- Last Synced: 2024-10-17T06:42:07.542Z (about 2 months ago)
- Language: Ruby
- Homepage:
- Size: 180 KB
- Stars: 32
- Watchers: 7
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- gwt-boot-awesome-lili - gwt-cache-filter - A servlet filter that adds the appropriate http caching headers to GWT generated files based on *.cache.* and *.nocache.* naming patterns (Caching Library)
- gwt-boot-awesome-lili - gwt-cache-filter - A servlet filter that adds the appropriate http caching headers to GWT generated files based on *.cache.* and *.nocache.* naming patterns (Caching Library)
README
# gwt-cache-filter
[![Build Status](https://api.travis-ci.com/realityforge/gwt-cache-filter.svg?branch=master)](http://travis-ci.com/realityforge/gwt-cache-filter)
[](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.realityforge.gwt.cache-filter%22%20a%3A%22gwt-cache-filter%22)The project consists of two filters. The `GWTCacheControlFilter` adds the appropriate
caching attributes to GWT generated files based on *.cache.* and *.nocache.* naming
patterns. The `PreEncodedGzipFilter` will serve a gzipped variant of a static file
if one is present on the file system and the request specifies the "Accept-Encoding"
http header to include "gzip". The gzipped variant of the static file should exist
on the file system with the same name as the resource but with ".gz" suffix.## Quick Start
The simplest way to use the library is to add the following dependency
into the build system. i.e.```xml
org.realityforge.gwt.cache-filter
gwt-cache-filter
0.9```
This will apply a filter across your entire application. Almost always you will want
to restrict the filter so that it only covers the gwt part of the application in which
case you should add the following snippet to web.xml;```xml
GWTCacheControlFilter
org.realityforge.gwt.cache_filter.GWTCacheControlFilter
PreEncodedGzipFilter
org.realityforge.gwt.cache_filter.PreEncodedGzipFilter
GWTCacheControlFilter
/example/*
PreEncodedGzipFilter
/example/*
```To get the GWT compiler to generate the gzipped files for you, the easiest way is to add
the following inherits to the ".gwt.xml" file.```xml
```A very simple example of this code is available in the `example` directory.