Gets or sets a value that indicates whether a cache of connections will be maintained by the application.
Assembly: System.Messaging (in System.Messaging.dll)
A connection cache is a list of references to structures that contain read or write handles to queues. When is true, the MessageQueue borrows handles from the cache each time you call Send(Object), Peek, or Receive, rather than open new handles. This can improve performance. Using a connection cache also insulates the MessageQueue from changes in the network topology.
If you create a new connection to a queue when the connection cache is full, the MessageQueue overwrites the least recently accessed structure with the new connection. You can clear the cache entirely by calling ClearConnectionCache, for example, if the format names of the queues you are working with have changed so that the previous read and write handles are no longer valid.
The following table shows whether this property is available in various Workgroup modes.
Local computer and direct format name
Remote computer and direct format name
The following code example gets and sets the value of a message queue's property.