Ehcache 1.5.0 User Guide - Getting Started(开始)

          Ehcache 1.5.0 User Guide - Getting Started

Ehcache 1.5.0 用户指南)

E_mail:[email protected]

Blog: http://blog.csdn.net/jianglike18

qq:29396597

 

3Getting Started

 

Ehcache can be used directly. It can also be used with the popular Hibernate Object/Relational tool. Finally, it can be used for Java EE Servlet Caching.

This quick guide gets you started on each of these. The rest of the documentation can be explored for a deeper understanding.

 

Ehcache 可以直接使用,也可以用于流行的Hibernate Object/Relational 工具和Java EE Servlet 缓存。

这个快速的指南让你从以上方面快速起步。其余的文档可用于深层理解的探究。)

 

 

General Purpose Caching

 

l             Make sure you are using a supported Java version.

l             Place the ehcache jar into your classpath.

l             Ensure that any libraries required to satisfy dependencies are also in the classpath.

l             Configure ehcache.xml and place it in your classpath.

l             Optionally, configure an appropriate logging level.

 

(缓存的一般目的:

l         确定你正在使用可支持的JAVA版本

l         ehcachejar包加入到类路径

l         确保需要的满足依赖的任何库也在类路径中

l         配置ehcache.xml文件并且将它放置在你的类路径

l         随意的配置应用日志的级别)

 

See the Code Samples chapter for more information on direct interaction with ehcache.

(查看Code Samples 章节获取更多直接使用ehcache的相关信息。)

 

Hibernate

l             Perform the same steps as General Purpose Caching .

l             Create caches in ehcache.xml.

See the Hibernate Caching chapter for more information.

 

Hibernate

l         根据 General Purpose Caching 执行相同的步骤,

l         ehcache.xml文件里创建缓存

查看Hibernate Caching 章节了解更多的信息。)

 

 

Java EE Servlet Caching

l             Perform the same steps as General Purpose Caching .

l             Configure a cache for your web page in ehcache.xml.

l             To cache an entire web page, either use SimplePageCachingFilter or create your own        subclass of CachingFilter

l             To cache a jsp:Include or anything callable from a RequestDispatcher, either use SimplePageFragmentCachingFilter or create a subclass of PageFragmentCachingFilter.

    Configure the web.xml. Declare the filters created above and create filter mapping associating the filter with a URL.

See the Web Caching chapter for more information.

l         根据 General Purpose Caching 执行相同的步骤,

l         ehcache.xml文件里为你的网页配置缓存

l         缓存怎么页面,使用SimplePageCachingFilter类或者创建自己的CachingFilter子类。

l         缓存JSP文件:包含的或可随时获取的来自RequestDispatcher ,无论是使用SimplePageFragmentCachingFilter或创建一个PageFragmentCachingFilter的子类。
配置web.xml中。宣布上述建立的过滤器并创建过滤器映射关联的过滤器的URL

查看Web Caching 章节了解更多的信息。)

 

 

RESTful and SOAP Caching with the Cache Server

(缓存服务器的RESTful and SOAP 缓存 )

l         Download the standalone cache server from

http://sourceforge.net/project/showfiles.php?group_id=93232

l         cd to the bin directory

l         Type startup.sh to start the server with the log in the foreground.

By default it will listen on port 8080, will have both RESTful and SOAP web services enabled, and will use a sample Ehcache configuration from the WAR module.

    See the code samples in the Cache Server chapter. You can use Java or any other programming language to the use the Cache Server.

See the Cache Server chapter for more information.

l         http://sourceforge.net/project/showfiles.php?group_id=93232

下载独立的缓存服务器

l         进入bin目录

l         在前台键入startup.sh以日志的形式启动服务器

l         服务默认是在8080端口监听,RESTful SOAP的网络服务是可用的,并且可以使用来自WAR模块简单的Ehcache配置。

 查看Cache Server 章节的代码示例,使用缓存服务器,你可以使用java或者任何其它的编程语言。

查看Cache Server 章节了解更多的信息。

 

 

JCache style caching

Ehcache contains an early draft implementation of JCache contained in the net.sf.ehcache.jcache package.

See the JSR107 chapter for usage.

Jcache形式的缓存

Ehcache 包含了一个早期粗略的JCache实现,该实现在net.sf.ehcache.jcache包中。)

查看JSR107章节使用方法。)

 

Spring, Cocoon, Acegi and other frameworks

Usually, with these, you are using ehcache without even realising it. The first steps in getting more control over what is happening are:

l         discover the cache names used by the framework

l         create your own ehcache.xml with settings for the caches and place it in the application classpath.

Spring, Cocoon, Acegi 和其他框架

  通常,在使用这些框架的时候,你甚至没有意识到你正在使用ehcache。第一步是通过什么正在发生获取更多控制:

l         发现被框架使用缓存名字

l         创建你自己的ehcache.xml文件设置缓存并且将改文件放置到应用程序的类路径中。

 

你可能感兴趣的:(java,user,caching,hibernate,缓存服务器,cache,soap)