def cart_list_post
cart_type = @req.cart_type
unless cart_type
log_action('nil', 'nil', 'nil', "LEGACY_CART_LIST", false, "Cartridge type not specified")
@reply.resultIO << "Invalid cartridge types: #{cart_type} specified"
@reply.exitcode = 109
render :json => @reply, :status => :bad_request
return
end
cache_key = "cart_list_#{cart_type}"
carts = get_cached(cache_key, :expires_in => 21600.seconds) {
Application.get_available_cartridges(cart_type)
}
log_action('nil', 'nil', 'nil', "LEGACY_CART_LIST")
@reply.data = { :carts => carts }.to_json
render :json => @reply
end