You are here: Symbol Reference > dtSearch.Engine Namespace > IndexCache Class > IndexCache Properties > AutoReopenTime Property
dtSearch .NET Standard API 2021.02
IndexCache.AutoReopenTime Property

Number of seconds an index can be left open before it is automatically closed and reopened.

public int AutoReopenTime;

When an index is opened, its view of the index contents is not changed by subsequent index updates. To ensure that indexes in the cache do not get out of date, use autoReopenTime to specify a maximum number of seconds before an open index is closed and reopened. 

On each access to the cache, the last-opened time for each index is compared to autoReopenTime and, if the index has not been opened for a sufficient period of time, the index is closed and reopened. 

The cache does not have its own thread to implement autoReopenTime, so it only checks autoReopenTime when the cache is accessed for any reason. 

Set autoReopenTime to -1 to have dtSearch check the modification date of the index on every search to see if the index should be closed and reopened reflect a recent update.

Copyright (c) 1998-2022 dtSearch Corp. All rights reserved.