• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

httpcache4j/httpcache4j: A HTTP cache for Java

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

httpcache4j/httpcache4j

开源软件地址:

https://github.com/httpcache4j/httpcache4j

开源编程语言:

Java 95.8%

开源软件介绍:

HTTPCache4j a Java Browser cache.

Build Status

HTTP Cache 4 Java is a project that tries to uphold the caching rules defined in HTTP. The rules are mostly defined in Section 13 in RFC2616. The rules are changing slightly in httpbis, and will result in a new set of RFCs which will invalidate RFC2616.

Most types in HTTPCache4j are immutable. Meaning all builders, and other types of objects.

I have created a few mutable versions which delegates to the immutable types underneath. The mutable versions are not thread safe.

Usage

Spring support

Spring support has been moved to separate repository.

Maven

Add this to your POM

<dependency>
  <groupId>org.codehaus.httpcache4j</groupId>
  <artifactId>httpcache4j-core</artifactId>
  <version>5.1.0</version>
</dependency>

Now choose your resolver.

<dependency>
  <groupId>org.codehaus.httpcache4j.resolvers</groupId>
  <artifactId>resolvers-commons-httpclient</artifactId>
  <version>5.1.0</version>
</dependency>

<dependency>
  <groupId>org.codehaus.httpcache4j.resolvers</groupId>
  <artifactId>resolvers-httpcomponents-httpclient</artifactId>
  <version>5.1.0</version>
</dependency>

<dependency>
  <groupId>org.codehaus.httpcache4j.resolvers</groupId>
  <artifactId>resolvers-ning-async</artifactId>
  <version>5.1.0</version>
</dependency>

Then choose your storage mechanism.

The core has a built in Memory storage, and is useful for non-persistent small data. The core also has a resolver built on java.net.URLConnection.

If this is not enough, there are a number of persistent storages to choose from

  <dependency>
    <groupId>org.codehaus.httpcache4j.storage</groupId>
    <artifactId>storage-file</artifactId>
    <version>5.1.0</version>
  </dependency>

There are also a few jdbc storages which are independently developed from the core.

SNAPSHOT version

Snapshots are available from

Maven

<repository>
  <id>sonatype-snapshots</id>
  <url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>

HTTP Library

If you want to use HTTPCache4j as a normal HTTP library without the caching functions, you can. Either just use a resolver, or use a NullStorage with the HTTPCache class.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap