Esempio n. 1
0
 def __setitem__(self, key, value):
     if key.find('/') >= 0:
         # Don't flood the cache with irrelevant "reply_to/..." and
         # "search/..." streams, we only need the main streams.
         return
     # Thank SCIENCE for lexically-sortable timestamp strings!
     if value > self.get(key, ''):
         JsonCache.__setitem__(self, key, value)
Esempio n. 2
0
 def __setitem__(self, key, value):
     if key.find('/') >= 0:
         # Don't flood the cache with irrelevant "reply_to/..." and
         # "search/..." streams, we only need the main streams.
         return
     value = int(value)
     if value > self.get(key, 0):
         JsonCache.__setitem__(self, key, value)