def has_key(self, key, version=None):
        key = self.make_key(key, version=version)
        self.validate_key(key)
        with self._lock.reader():
            exp = self._expire_info.get(key)
            if exp is None:
                return False
            elif exp > time.time():
                return True

        with self._lock.writer():
            try:
                del self._cache[key]
                del self._expire_info[key]
            except __HOLE__:
                pass
            return False
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/core/cache/backends/locmem.py/LocMemCache.has_key