Click or drag to resize

SessionBaseClearAllCachedObjectsWhenDetectingUpdatedDatabase Property

By default we clear all cached object when at the beginning of a transaction we detect an updated Database within our cached databases. Same logic is applied when calling ForceDatabaseCacheValidation. We do so because most of the time an object in one database have (strong) references to objects in other databases. If Database A is NOT updated but database B is and an object in database A is cached with a strong reference to an object in database B then our cached object in database A may contain a stale/incorrect reference to object in database B. This is why we, by default, invalidate all cached objects when we detect a modified database within our cached databases. However, if you design your database schema without strong references between databases then you do not need to invalidate cached objects for other databases, only the ones that have changed. By consistently using WeakIOptimizedPersistableReferenceT, BTreeSetKey and BTreeMapKey, Value, you can keep references weak between databases. In such cases, set this property to false.

Namespace:  VelocityDb.Session
Assembly:  VelocityDb (in VelocityDb.dll) Version: 11.1.0.0 (11.1)
Syntax
public static bool ClearAllCachedObjectsWhenDetectingUpdatedDatabase { get; set; }

Property Value

Type: Boolean
See Also