def __init__(self, clean_check_percent = settings.cache["CLEAN_CHECK_PERCENT"],
      max_hits_to_clean = settings.cache["MAX_HITS_TO_CLEAN"],
        default_timeout = settings.cache["DEFAULT_TIMEOUT"]):
        """
        Initializer

        Args:
            clean_check_percent: how often cache initialization should
                run the cache cleanup
            max_hits_to_clean: maximum number of stale hits to clean
            default_timeout: default length a cache item is good for
        """
        self.clean_check_percent = clean_check_percent
        self.max_hits_to_clean = max_hits_to_clean
        self.default_timeout = default_timeout

        if random.randint(1, 100) < self.clean_check_percent:
            self._clean_cache()

        if 'AEU_Events' in __main__.__dict__:
            __main__.AEU_Events.fire_event('cacheInitialized')
dataset/ETHPy150Open CollabQ/CollabQ/common/appengine_utilities/cache.py/Cache.__init__/original