Partager via


Cache.Flush Method

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Flush the cache.

Namespace:  Microsoft.Practices.EnterpriseLibrary.Caching
Assembly:  Microsoft.Practices.EnterpriseLibrary.Caching (in Microsoft.Practices.EnterpriseLibrary.Caching.dll)

Syntax

'Declaration
PublicSubFlush
publicvoidFlush()
public:
voidFlush()
publicfunctionFlush()

Remarks

There may still be thread safety issues in this class with respect to cacheItemExpirations and scavenging, but I really doubt that either of those will be happening while a Flush is in progress. It seems that the most likely scenario for a flush to be called is at the very start of a program, or when absolutely nothing else is going on. Calling flush in the middle of an application would seem to be an "interesting" thing to do in normal circumstances.

See Also

Cache Class

Microsoft.Practices.EnterpriseLibrary.Caching Namespace

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.