With explicit caching (Auto Cache=false), you decide exactly what data gets stored in the cache and when it is updated. Explicit caching gives you full control over the cache contents by using explicit execution of CACHE statements.
To load data in the cache, simply execute a "CACHE table_name WHERE ..." statement and any matching data in table_name will be loaded into the corresponding table_name table.
Create or Update the Cached Table Explicitly
String cmd = "CACHE Lead", connection"; stat.execute(cmd);Note: The above command will update modified rows and add missing rows in the cached table. However, it will not delete extra rows that are already in the cache.
Update Cached Table to Contain Only the Live Data
String cmd = "CACHE Lead WITH TRUNCATE", connection"; stat.execute(cmd);Note: The above command will delete rows in the cache table that are not present in the live data source.