(self, url_data, service_id, service_version)
return create_cache_settings
Returns create_cache_settings response json.

        :return: a JSON-serializable dictionary matching the format of the JSON
                 response for fastly_client.create_cache_settings()
                 ("/service/<service_id>/version/<service_version>/cache_settings")
                 request.
Returns create_cache_settings response json.
Returns create_cache_settings response json .
def create_cache_settings(self, url_data, service_id, service_version):
        """
        Returns create_cache_settings response json.

        :return: a JSON-serializable dictionary matching the format of the JSON
                 response for fastly_client.create_cache_settings()
                 ("/service/<service_id>/version/<service_version>/cache_settings")
                 request.
        """
        request_dict = {k: v[0] for k, v in url_data}

        create_cache_settings = {
            "stale_ttl": request_dict.get("stale_ttl", 0),
            "ttl": request_dict.get("ttl", 0),
            "action": request_dict.get("action", ""),
            "cache_condition": "",
            "name": "cache_setting",
            "version": service_version,
            "service_id": service_id
        }

        if 'cache_settings_list' not in self.fastly_cache[service_id]:
            self.fastly_cache[service_id]['cache_settings_list'] = []

        self.fastly_cache[service_id][
            'cache_settings_list'].append(create_cache_settings)
        return create_cache_settings
def create_cache_settings ( self , url_data , service_id , service_version ) : request_dict = { k : v [ 0 ] for k , v in url_data } create_cache_settings = { "stale_ttl" : request_dict . get ( "stale_ttl" , 0 ) , "ttl" : request_dict . get ( "ttl" , 0 ) , "action" : request_dict . get ( "action" , "" ) , "cache_condition" : "" , "name" : "cache_setting" , "version" : service_version , "service_id" : service_id } if 'cache_settings_list' not in self . fastly_cache [ service_id ] : self . fastly_cache [ service_id ] [ 'cache_settings_list' ] = [ ] self . fastly_cache [ service_id ] [ 'cache_settings_list' ] . append ( create_cache_settings ) return create_cache_settings