Changes between Initial Version and Version 1 of Ticket #60


Ignore:
Timestamp:
11/11/2011 02:40:55 PM (14 years ago)
Author:
chenchongqi
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #60

    • Property Status changed from new to closed
    • Property Resolution changed from to fixed
  • Ticket #60 – Description

    initial v1  
    22mongo 里看,入库流量大于出库流量 
    33李思亮(李思亮) 2011-08-30 16:38:42 
    4   
     4 [[Image(ticket:60:io.png)]]  
    55李思亮(李思亮) 2011-08-30 16:38:53 
    66绿的是入库,蓝的出库 
     
    1919陈崇锜(陈崇锜) 2011-08-31 09:19:33 
    2020我是检查别的问题顺带发现这个的,那个hit只是给自己看的,现在稳定了可以不用了 
     21{{{ 
     22        public String get(String uri, String key) { 
     23... 
     24                 
     25                        cache = rRepository.find(key, uri); 
     26                        if(cache != null){ 
     27                                //不论是否成功 设置hit 
     28                                //cache.setHit(cache.getHit()+1);// 
     29                                //cache.setHitTime(new Date());// 
     30                                                         
     31                                String content = null; 
     32                                try{ 
     33                                        content = new String(cache.getContent()); 
     34                                }catch(Exception e){ 
     35                                        logger.error("[MongoRClientHelper] get cache:"+uri+" fail,message:"+e.getMessage()); 
     36                                        rRepository.remove(cache); 
     37                                        return ""; 
     38                                } 
     39                                 
     40                                //成功了 设置(失败也要置hit) 
     41                                //rRepository.save(cache); 
     42                                 
     43                                logger.debug("[MongoRClientHelper] get cache:"+uri+" success"); 
     44                                return content; 
     45                        } 
     46... 
     47}}}