隨筆-153  評論-235  文章-19  trackbacks-0
                想學習緩存框架已經很久了,一直沒做到,可能是太忙了.現在開始學習了,

          1.下載
          我下的是1.2.4
          下載地址: http://sourceforge.net/project/showfiles.php?group_id=93232

          2.看了文檔,有幾個核心的類要記住
          CacheManager   緩存管理器
          Cache   緩存
          Element   被緩存的內容

          CacheManager 可以是單例,也可以是instance
          CacheManager.create();返回單例
          直接new 是instance

          添加Cache
          CacheManager singletonManager = CacheManager.create();
          Cache memoryOnlyCache = new Cache("testCache", 5000, false, false, 5, 2);
          manager.addCache(memoryOnlyCache);

          得到Cache
          Cache test = singletonManager.getCache("testCache");


          Cache的參數可以放到屬性文件里,我比較關注這點

          在下載來的包里有ehcache.xml文件,

          講不清楚還是寫個例子好,看我例子的文章: http://www.aygfsteel.com/chenlb/archive/2007/08/02/133988.html


          官方手冊
          http://ehcache.sourceforge.net/EhcacheUserGuide.html



          posted on 2007-08-02 14:19 流浪汗 閱讀(1456) 評論(0)  編輯  收藏 所屬分類: OpenSource
          主站蜘蛛池模板: 莒南县| 华蓥市| 固安县| 丰城市| 锦州市| 博客| 嘉峪关市| 手游| 青河县| 上林县| 博乐市| 通城县| 达孜县| 门头沟区| 招远市| 上林县| 开平市| 哈巴河县| 曲麻莱县| 卢龙县| 股票| 毕节市| 渝北区| 孝感市| 义乌市| 阿巴嘎旗| 博湖县| 聊城市| 喀喇沁旗| 三亚市| 永春县| 温宿县| 当涂县| 平昌县| 邳州市| 海南省| 波密县| 天津市| 闻喜县| 奈曼旗| 建阳市|