Skip to main content
.NET Framework 4.5.2+

Session.DropCache() Method


Use DropIdentityMap instead

Clears the object cache.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v23.1.dll

NuGet Package: DevExpress.Xpo


[Obsolete("Use DropIdentityMap() instead")]
public void DropCache()


All the persistent objects which were loaded using the current session are stored in the object cache. The DropCache method invalidates the object references thus enabling the garbage collector to free up the space which is occupied by the session object at a later time.

Note:    Calling the DropCache method has the same effect as reconnecting a session.

See Also