SessionBaseCrossTransactionCacheAllDatabases Method |
By default databases are only referenced by a
WeakReference across transaction boundaries.
This means that such Database may or may not be available as a cached database depending on garbage collection activity and if such database also has a strong reference.
This function lets you add a strong reference to all Databases so the cached Database may be used if version wasn't changed by a different thread since prior transaction.
A strong reference is removed for any database that get invalidated due to a transaction abort or if another transaction commits a change to it.
Namespace:
VelocityDb.Session
Assembly:
VelocityDb (in VelocityDb.dll) Version: 8.2.1.0 (8.2.1)
Syntaxpublic void CrossTransactionCacheAllDatabases(
bool enable = true
)
Public Sub CrossTransactionCacheAllDatabases (
Optional enable As Boolean = true
)
public:
void CrossTransactionCacheAllDatabases(
bool enable = true
)
member CrossTransactionCacheAllDatabases :
?enable : bool
(* Defaults:
let _enable = defaultArg enable true
*)
-> unit
Parameters
- enable (Optional)
- Type: SystemBoolean
Add or remove strong reference. If true, add a strong reference
See Also