Click or drag to resize

SessionBaseCrossTransactionCacheAllDatabases Method

By default databases are referenced by strong references instead of 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. Check current session state with StrongReferenceDatabaseCaching

Namespace:  VelocityDb.Session
Assembly:  VelocityDb (in VelocityDb.dll) Version: 11.1.0.0 (11.1)
Syntax
public void CrossTransactionCacheAllDatabases(
	bool enable = true
)

Parameters

enable (Optional)
Type: SystemBoolean
Add or remove strong reference. If true, add a strong reference
See Also