go4it

just do it

2009年7月9日

JdonFramework的缓存设计

摘要: JdonFramework的缓存设计 内嵌对象(Embedded Object)缓存设计 请看下面这段代码: public class Category extends Model{ String Id; Product product; //内嵌包含了一个Product对象 } Category这个Model内嵌了Product这个Model,属于一种关联关系。 目前Jdon框架提供的缺省缓存是... 阅读全文

posted @ 2009-07-09 20:58 cxccbv 阅读(453) 评论(0) 推荐(0)

LForum与Ehcache(五)页面缓存

摘要: 因为LForum使用的是freemaker,好像没看到页面缓存,好像也没关联。 但可以参考http://hain.javaeye.com/blog/152806 细谈Ehcache页面缓存的使用 /** *作者:张荣华 *日期:2007-9-30 **/ 关于缓存的话题,在坛子里已经有很多讨论,简单的来说,如果一个应用中80%的时间内都在访问20%的数据,那么,这时候就应该使用缓存了。这个和长尾理... 阅读全文

posted @ 2009-07-09 18:10 cxccbv 阅读(414) 评论(0) 推荐(0)

LForum与Ehcache(四)配置Hiberante

摘要: 由于不大熟悉SpringSide3,找了半天没找到配置hiberante的xml文件,最后搜索一下,出来了: 在E:\MyEclipseWorkplace\LForum\webapp\WEB-INF\config\applicationContext.xml里面有一段:<!-- Hibernate配置 --> <bean id="sessionFactory" class="o... 阅读全文

posted @ 2009-07-09 17:45 cxccbv 阅读(400) 评论(0) 推荐(0)

LForum与Ehcache(三)removeCache

摘要: package com.javaeye.lonlysky.lforum.service.admin;import java.util.List;import org.hibernate.SessionFactory;import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.springframework.beans.fact... 阅读全文

posted @ 2009-07-09 16:21 cxccbv 阅读(438) 评论(0) 推荐(0)

LForum与Ehcache(二)CachesManager--论坛html数据缓存

摘要: package com.javaeye.lonlysky.lforum.service;import java.io.File;import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map;import java.util.regex.Matcher;import jav... 阅读全文

posted @ 2009-07-09 16:01 cxccbv 阅读(473) 评论(0) 推荐(0)

LForum与Ehcache(一)LForumCache

摘要: LForumCachepackage com.javaeye.lonlysky.lforum.cache;import java.net.URL;import java.util.List;import net.sf.ehcache.Cache;import net.sf.ehcache.CacheManager;import net.sf.ehcache.Element;import org.s... 阅读全文

posted @ 2009-07-09 16:00 cxccbv 阅读(464) 评论(0) 推荐(0)

Ehcache源码研究(五)CacheFilter

摘要: /** * Copyright 2003-2009 Luck Consulting Pty Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may o... 阅读全文

posted @ 2009-07-09 12:00 cxccbv 阅读(1256) 评论(0) 推荐(0)

Ehcache源码研究(四)Filter

摘要: Ehcache-1.6.0源码\web\src\main\java\net\sf\ehcache\constructs\web\/** * Copyright 2003-2009 Luck Consulting Pty Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not u... 阅读全文

posted @ 2009-07-09 11:59 cxccbv 阅读(1317) 评论(0) 推荐(0)

Ehcache源码研究(三)Element

摘要: /** * Copyright 2003-2008 Luck Consulting Pty Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may o... 阅读全文

posted @ 2009-07-09 11:47 cxccbv 阅读(1021) 评论(0) 推荐(0)

Ehcache源码研究(二)CacheManager

摘要: /** * Copyright 2003-2008 Luck Consulting Pty Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may o... 阅读全文

posted @ 2009-07-09 11:45 cxccbv 阅读(4423) 评论(5) 推荐(0)

Ehcache源码研究(一)Ehcache接口

摘要: /** * Copyright 2003-2008 Luck Consulting Pty Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may o... 阅读全文

posted @ 2009-07-09 11:38 cxccbv 阅读(2926) 评论(3) 推荐(0)

Ehcache学习(八)实例二

摘要: Ehcache使用实例(二) Cache使用 l 得到一个Cache引用 获得一个sampleCache1的引用,从官方下载ehcache.xml,在ehcache.xml中已经有配置好的缓存,大家直接使用就可以,或是做测试,如果说真正使用的时候,最后自己手动配置一个比较好。 Cache cache = manager.getCache(“sampleCache1”); l 使用Cache Put... 阅读全文

posted @ 2009-07-09 11:12 cxccbv 阅读(867) 评论(0) 推荐(0)

Ehcache学习(七)实例一

摘要: Ehcache使用用例(一) Singleton创建方式 Ehcache1.2版本之后,都可以使用singleton(工厂创建方法)去创建一个singleton的CacheManager实例。 CacheManager.create(); String[] cacheNames = CacheManager.getInstance().getCacheNames(); 使用默认配置创建CacheM... 阅读全文

posted @ 2009-07-09 11:10 cxccbv 阅读(1171) 评论(0) 推荐(0)

Ehcache学习(六)缓存机制

摘要: Ehcache Storage Options http://blog.csdn.net/mgoann/archive/2009/04/20/4094768.aspx 简介 Ehcache俩中缓存机制: · MemoryStore(内存存储) · DiskStore(磁盘存储) MemoryStore MemoryStore总是可用的,但不可直接操作,当中存储着所有的Cache。 · 合适... 阅读全文

posted @ 2009-07-09 11:02 cxccbv 阅读(1563) 评论(0) 推荐(0)

Ehcache学习(五)缓存配置

摘要: Ehcache缓存配置 http://blog.csdn.net/mgoann/archive/2009/04/17/4087714.aspx 简介 Cache的配置很灵活,官方提供的Cache配置方式有好几种。你可以通过声明配置、在xml中配置、在程序里配置或者调用构造方法时传入不同的参数。 你可以将Cache的配置从代码中剥离出来,也可以在使用运行时配置,所谓的运行时配置无非也就是在代码中... 阅读全文

posted @ 2009-07-09 11:01 cxccbv 阅读(1668) 评论(0) 推荐(0)

Ehcache学习(四)缓存模式

摘要: 简介 http://blog.csdn.net/mgoann/archive/2009/04/17/4086641.aspx 缓存有多种不同的缓存模式。以下是Ehcache支持的缓存模式: · 直接操作(direct manipulation) · 推送模式(pull-through) · 自填充(self-populating) 直接操作(direct manipulation) 你可... 阅读全文

posted @ 2009-07-09 10:59 cxccbv 阅读(640) 评论(0) 推荐(0)

Ehcache学习(三)关键类

摘要: http://blog.csdn.net/mgoann/archive/2009/04/17/4086534.aspx Ehcache关键类 简介 Ehcache中的CacheManager是用来管理Cache的。而Cache中包含元素Element,而Element实质上就是一个键值对。Cache在物理方面的实现有内存实现和磁盘实现。 CacheManager CacheManager包含C... 阅读全文

posted @ 2009-07-09 10:51 cxccbv 阅读(717) 评论(0) 推荐(0)

Ehcache学习(二)入门指南

摘要: 入门指南http://blog.csdn.net/mgoann/archive/2009/04/16/4083962.aspx Ehcache Getting Started 简介 Ehcache可以直接使用。也可以和Hibernate对象/关系框架结合使用。还可以做Servlet缓存。 通用缓存 · 确保JDK版本支持你现有的Ehcache版本,Ehcache支持JDK1.4和1.5以及1.6版... 阅读全文

posted @ 2009-07-09 10:41 cxccbv 阅读(803) 评论(0) 推荐(0)

Ehcache学习(一)简介

摘要: Ehacahe简介http://blog.csdn.net/mgoann/archive/2009/04/16/4083179.aspx Ehcache 简介 Ehcache是一种广泛使用java分布式缓存的通用缓存,J2EE和轻量级容器。 它具有内存和磁盘缓存,副本的copy和失效,监听,缓存装载,扩展缓存,缓存异常处理,gzip缓存servlet过滤器,RESTful&SOAP API... 阅读全文

posted @ 2009-07-09 10:37 cxccbv 阅读(754) 评论(0) 推荐(0)

导航