def get_cdn_data(self, env, cdn_obj_path):
        """
        Retrieves HashData object from memcache or by doing a GET
        of the cdn_obj_path which should be what is returned from
        get_hsh_obj_path. Will return None if the HashData is "deleted"

        :returns: HashData object or None.
        """
        memcache_client = utils.cache_from_env(env)
        memcache_key = self.cdn_data_memcache_key(cdn_obj_path)
        if memcache_client:
            cached_cdn_data = memcache_client.get(memcache_key)
            if cached_cdn_data == '404':
                return None
            if cached_cdn_data:
                try:
                    hash_data = HashData.create_from_json(cached_cdn_data)
                    if hash_data.deleted:
                        return None
                    else:
                        return hash_data
                except ValueError:
                    pass

        resp = make_pre_authed_request(
            env, 'GET', cdn_obj_path,
            agent='SwiftOrigin', swift_source='SOS').get_response(self.app)
        if resp.status_int // 100 == 2:
            try:
                if memcache_client:
                    memcache_client.set(memcache_key, resp.body,
                                        serialize=False,
                                        time=MEMCACHE_TIMEOUT)

                hash_data = HashData.create_from_json(resp.body)
                if not hash_data.deleted:
                    return hash_data
            except ValueError:
                self.logger.warn('Invalid HashData json: %s' % cdn_obj_path)
        if resp.status_int == 404:
            if memcache_client:
                # only memcache for 30 secs in case adding container to swift
                memcache_client.set(memcache_key, '404',
                                    serialize=False, time=CACHE_404)

        return None
dataset/ETHPy150Open dpgoetz/sos/sos/origin.py/OriginBase.get_cdn_data/original