// *****************************
IPlugInFinder pluginFinder;
if (useCache) {
try { // try to load from cache
pluginFinder = new CachePlugInFinder();
} catch (Exception e) {
// loading the cache failed
pluginFinder = initBySearch(ps);
// create a new cache
CachePlugInFinder cf = new CachePlugInFinder();
cf.copyFrom(pluginFinder);
cf.write();
}
} else {
pluginFinder = initBySearch(ps);
}