---
title: "Proxy Properties"
url: https://docs.zeroc.com/ice/3.8/property-reference/proxy-properties
docs_index: https://docs.zeroc.com/llms.txt
---

> For an index of every page, see [llms.txt](https://docs.zeroc.com/llms.txt).

# Proxy Properties

Parts of this page are for some programming languages only, and name them. For one language's text alone, see [C++](https://docs.zeroc.com/ice/3.8/property-reference/proxy-properties/cpp.md), [C#](https://docs.zeroc.com/ice/3.8/property-reference/proxy-properties/csharp.md), [Java](https://docs.zeroc.com/ice/3.8/property-reference/proxy-properties/java.md), [JavaScript](https://docs.zeroc.com/ice/3.8/property-reference/proxy-properties/js.md), [MATLAB](https://docs.zeroc.com/ice/3.8/property-reference/proxy-properties/matlab.md), [PHP](https://docs.zeroc.com/ice/3.8/property-reference/proxy-properties/php.md), [Python](https://docs.zeroc.com/ice/3.8/property-reference/proxy-properties/python.md), [Ruby](https://docs.zeroc.com/ice/3.8/property-reference/proxy-properties/ruby.md), and [Swift](https://docs.zeroc.com/ice/3.8/property-reference/proxy-properties/swift.md).

The communicator operation [propertyToProxy](https://docs.zeroc.com/ice/3.8/runtime/invocation/creating-proxies.md) creates a proxy from a group of configuration properties. The argument to `propertyToProxy` is a string representing the base name of the property group (shown as *name* in the property descriptions below). This name must correspond to a property that supplies the stringified form of the proxy. Subordinate properties can be defined to customize the proxy's local configuration.

The communicator operation [proxyToProperty](https://docs.zeroc.com/ice/3.8/runtime/invocation/converting-proxies-to-strings.md) performs the inverse operation, that is, returns the property group for a proxy.

## *name*

`name=proxy`

The base property of the group with an application-specific `name` supplying the stringified representation of a proxy. Use the communicator operation `propertyToProxy` to retrieve the property and convert it into a proxy.

> **C++, C#, Java, MATLAB, PHP, Python, Ruby, and Swift**
>
> ## *name*.CollocationOptimized
>
> `name.CollocationOptimized=num`
>
> If `num` is a value greater than `0`, the proxy is configured to use [collocated invocations](https://docs.zeroc.com/ice/3.8/runtime/collocated-invocation-and-dispatch.md) when possible (C++, C#, Java, Python, and Swift: Defining this property is equivalent to invoking the `ice_collocationOptimized` proxy method) (MATLAB, PHP, and Ruby: including calls to the communicator's [Ice.Admin object adapter](https://docs.zeroc.com/ice/3.8/property-reference/ice-admin-properties.md)).

## *name*.ConnectionCached

`name.ConnectionCached=num`

If `num` is a value greater than `0`, the proxy [caches](https://docs.zeroc.com/ice/3.8/runtime/connection-management/connection-establishment.md) its chosen connection for use in subsequent requests. Defining this property is equivalent to invoking the `ice_connectionCached` proxy method.

## *name*.Context.*key*

`name.Context.key=value`

Adds the key/value pair to the proxy's [request context](https://docs.zeroc.com/ice/3.8/runtime/invocation/request-contexts/per-proxy-request-contexts.md).

## *name*.EndpointSelection

`name.EndpointSelection=type`

Specifies the proxy's [endpoint selection](https://docs.zeroc.com/ice/3.8/runtime/connection-management/connection-establishment.md) type. Legal values are `Random` and `Ordered`. Defining this property is equivalent to invoking the `ice_endpointSelection` proxy method.

## *name*.InvocationTimeout

`name.InvocationTimeout=num`

Specifies the [invocation timeout](https://docs.zeroc.com/ice/3.8/runtime/invocation/invocation-timeouts.md) of this proxy, in milliseconds. The default is [Ice.Default.InvocationTimeout](https://docs.zeroc.com/ice/3.8/property-reference/ice-default-properties.md#ice.default.invocationtimeout). Defining this property is equivalent to invoking the `ice_invocationTimeout` proxy method.

## *name*.Locator

`name.Locator=proxy`

Specifies the [locator](https://docs.zeroc.com/ice/3.8/runtime/locators.md) of this proxy. Defining this property is equivalent to invoking the `ice_locator` proxy method.

This is a proxy property, so you can configure additional local aspects of the proxy with subordinate properties. For example:

```config
MyProxy.Locator=...
MyProxy.Locator.EndpointSelection=Ordered
```

## *name*.LocatorCacheTimeout

`name.LocatorCacheTimeout=num`

Specifies the [locator cache](https://docs.zeroc.com/ice/3.8/runtime/locators/locator-semantics-for-clients.md) timeout of this proxy, in seconds. The default is [Ice.Default.LocatorCacheTimeout](https://docs.zeroc.com/ice/3.8/property-reference/ice-default-properties.md#ice.default.locatorcachetimeout). A value of `0` disables caching. A negative value means cache entries never expire.

## *name*.Router

`name.Router=proxy`

Specifies the [router](https://docs.zeroc.com/ice/3.8/services/glacier2.md) of this proxy. Defining this property is equivalent to invoking the `ice_router` proxy method.

This is a proxy property, so you can configure additional local aspects of the proxy with subordinate properties. For example:

```config
MyProxy.Router=...
MyProxy.Router.EndpointSelection=Ordered
```
