About the channel list cache

NDS servers typically advertise tens to hundreds of thousands of channels. Under the NDS1 protocol, the channel list must be downloaded before fetching data so that the data types of the channels are known. NDS2 does not suffer from this limitation because the data types of requested channels are always sent along with the binary data. However, when you are using the NDS2 client library interactively you may want to be able to search through the channel list at any time.

The SWIG interface deals with the channel lists is several ways. For NDS1 connections the SWIG interface caches the channel lists for all servers to which you have connected in the past 24 hours. After querying the channel list for a given server, for the next 24 hours any time you call find_channels(), instead of downloading the channel list from the server, the NDS client library searches through your local cache. After 24 hours, the next time you call find_channels() for that server, the client library will clear the cache and download that server's channel list again.

You can discard the contents of the channel cache for a given server at any time using the connection.clear_cache() method (in Java, connection.clearCache()). This command drops all the tables in the database, leaving the database empty.

Each server's cache is stored on your computer in its own Sqlite database.

For NDS2 servers the list is not cached. However you can reduce the size of the channel list that is returned by setting an epoch (a [start,stop) time range). By setting an epoch you receive only the channels that were active during that [start, stop) time frame.