예제 #1
0
파일: mc_total.py 프로젝트: pakt/sqlbean
 def __call__(self, key):
     mk = self.mc_key%key
     count = mc.get(mk)
     if count is None:
         count = self.get_count(key) or 0
         mc.set(mk, count, self.timeout)
     return count
예제 #2
0
파일: mc_total.py 프로젝트: pakt/sqlbean
 def decr(self, key):
     mk = self.mc_key%key
     if mc.get(mk) is not None:
         mc.decr(mk)