ConnectCacheSize Property of the IFPCWebProxy Interface

The ConnectCacheSize property gets or sets a value that is a factor for determining the maximum size of the connection cache.

[C++]
HRESULT put_ConnectCacheSize(
	long lCacheSize
);
HRESULT get_ConnectCacheSize(
	long* plCacheSize
);

Parameters

plCacheSize

Pointer to a variable that is set on return to a 32-bit integer specifying a value that is a factor for determining the maximum size of the connection cache.

lCacheSize

A 32-bit integer that specifies a value that is a factor for determining the maximum size of the connection cache.

Return Value

These property methods return S_OK if the call is successful; otherwise, they return an error code.

[Visual Basic]
Property ConnectCacheSize As Long

Property Value

A 32-bit integer that specifies a value that is a factor for determining the maximum size of the connection cache.

Example Code

This VBScript script disables connection caching by setting the value of the ConnectCacheSize property to 0. This script does not include error handling.
' Create the root object.
Dim root  ' The FPCLib.FPC root object
Set root = CreateObject("FPC.Root")
' Declare the other objects needed.
Dim isaArray	 ' An FPCArray object
Dim webProxy	 ' An FPCWebProxy object
Dim restartMask  ' A 32-bit bitmask of type FpcServices
' Get references to the array object
' and the Web proxy object. 
Set isaArray = root.GetContainingArray()
Set webProxy = isaArray.ArrayPolicy.WebProxy
' Disable connection caching. 
webProxy.ConnectCacheSize = 0
restartMask = webProxy.GetServiceRestartMask
webProxy.Save
' Restart the Firewall service so that
' the change will take effect.
isaArray.RestartServices restartMask

Remarks

This property is read/write. Its default value is 128, and its range of permissible values is from 0 to 50,000.

The other factor that determines the maximum size of the connection cache is set internally and is based on the total physical memory and on the type and number of processors in the Forefront TMG computer. Cached connections are removed from the cache according to fixed expiration policies.

Setting this property to 0 disables connection caching. However, this degrades performance because of the need to open a new connection to the Web server for each client request and the resultant increase in the number of connections opened per second.

If clients access a Web site that uses a custom connection-based authentication method through a Forefront TMG computer and the authentication method relies on the connection between the Forefront TMG computer and the Web server, the personal data of one client may be exposed to another client. Because of connection caching, after the Web server authenticates a connection opened by the Web proxy for the first client, the Web proxy can reuse the connection for a second client, and the Web server will let the new client browse the personal data provided by the first client for authentication. This problem can be avoided by setting the ConnectCacheSize property to 0.

After the value of this property has been modified, the change must be written to persistent storage by calling the Save method, and the Microsoft Firewall service must be restarted for the change to take effect. For more information about restarting the Firewall service to apply changes, see Restarting Services After Configuration Changes.

This property cannot be accessed through Forefront TMG Management.

Requirements

Client Requires Windows Vista or Windows XP.
Server Requires Windows Server 2008.
Version Requires Forefront Threat Management Gateway (TMG).
IDL

Declared in Msfpccom.idl.

DLL

Requires Msfpccom.dll.

See Also

FPCWebProxy


Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.