File dataDirectory = new File(
"/Users/alyona/Data/wikipedia/data/20090306");
if (cacheData) {
ProgressNotifier progress = new ProgressNotifier(5);
// cache tables that will be used extensively
TIntHashSet validPageIds = wikipedia.getDatabase().getValidPageIds(
dataDirectory, 2, progress);
wikipedia.getDatabase().cachePages(dataDirectory, validPageIds,
progress);