Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
A poke based cache dictionary.

Every time an entry is retrieved using self[key] the associated key is poked and an internal
poke counter is incremented by one.  This counter represents how important this key is, and
hence a high counter makes it less likely for this key to be removed from the cache.

Periodially the self.cleanup() method must be called.  The cleanup will reduce the poke counter
for every key by value V, where V is determined by the number of pokes performed since the last

src/s/w/swiftarm-HEAD/tribler/Tribler/dispersy/community.py   swiftarm(Download)
from bloomfilter import BloomFilter
from cache import CacheDict
from candidate import LoopbackCandidate
from conversion import BinaryConversion, DefaultConversion
        # the subjective sets.  the dictionary containing subjective sets that were recently used.
        self._subjective_sets_enabled = any(isinstance(meta.destination, SubjectiveDestination) for meta in self._meta_messages.itervalues())
        self._subjective_sets = CacheDict()  # (member, cluster) / SubjectiveSetCache pairs
        self._subjective_set_clusters = []   # all cluster numbers used by subjective sets