Platform SDK: CDO for Windows 2000

Cacheable Sinks

The event dispatcher can cache sinks for subsequent use in later transport events. Sinks specify whether they can be cached by exposing an appropriate implementation of the IEventIsCacheable interface. This interface is defined as a part of the Server Extension Objects (SEO) type library located in the Component Object Model (COM) dynamic-link library (DLL), SEO.DLL.

When an event dispatcher thread creates an instance of a sink COM class, it first calls QueryInterface for the IEventIsCacheable interface on the object. If the interface is supported, it then calls the IsCacheable method on the interface. If this call returns S_OK, the sink indicates that it supports being cached and the event dispatcher caches the sink for subsequent use.

If a sink indicates that it is not cacheable—either by not implementing the IEventIsCacheable interface or by returning any HRESULT value other than S_OK from the IsCacheable method when it is called—the event dispatcher immediately destroys the object after it has been used to handle an event. New instances of the COM class are created for each event that occurs.