[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Base class for a Connection and DbCommand cache.
Implementations control the lifecycle via lifecycle methods, or may simple obtain new resources and close new resources every time.
This is not a pool - a cache is associated with one client class and that class is expected to use cache methods in well-defined order of get, done-with and destroy.
The following tables list the members exposed by the ConnectionCache type.
Public Methods
Name | Description | |
---|---|---|
![]() | Destroy | Destroys cache closing all resources cached, if any. |
![]() | Dispose |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
![]() | DoneWith | Indicate to return the connection and statement pair after use. |
![]() | Equals | (Inherited from Object.) |
![]() | GetConnection | Returns a cached or new connection and statement pair. |
![]() | GetHashCode | Serves as a hash function for a particular type. GetHashCode() is suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
Protected Methods
Name | Description | |
---|---|---|
![]() | Close | Close resources. |
![]() | Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) |
![]() | MakeNew | Make a new pair of resources. |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |