Web.WebReq.TWebRequestHandler.CacheConnections

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property CacheConnections: Boolean read FCacheConnections write SetCacheConnections;

C++

__property bool CacheConnections = {read=FCacheConnections, write=SetCacheConnections, nodefault};

Properties

Type Visibility Source Unit Parent
property public
Web.WebReq.pas
Web.WebReq.hpp
Web.WebReq TWebRequestHandler

Description

Determines whether the Web modules used by the application are cached for re-use.

Each time an Apache (multi-device), ISAPI (Windows only), or NSAPI (Windows only) application receives an HTTP request message, it spawns a thread to handle the request and creates a new Web module that contains instances of all the objects used in the Web application. To improve performance, these Web modules can be saved in a cache when the thread associated with the HTTP request message finishes executing.

Set CacheConnections to true to have the Web application save inactive Web modules in a cache. Caching the Web modules speeds performance as new instances of the Web module and its contents do not need to be created every time a request message is received. Set CacheConnections to false to have the Web application create a new Web module for every request thread. Recreating the Web module ensures that changes made to the module or its contents when servicing the last request do not cause unexpected behavior the next time the module is activated.

CacheConnections is only relevant to Apache (multi-device), ISAPI (Windows only), or NSAPI (Windows only) Web applications.

See Also