//------------------------------------------------//
protected UserCache[] userCaches = new UserCache[0];
protected synchronized UserCache addUserCache(String userCacheName, String[] fields, int id) {
UserCacheImpl uc = new UserCacheImpl();
uc.setName(userCacheName);
uc.setIndexFieldNames(fields);
uc.setId(id);
uc.setActive(true);
if (id >= userCaches.length) {
UserCache[] newUserCaches = new UserCache[id+1];
System.arraycopy(userCaches, 0, newUserCaches, 0, userCaches.length);
userCaches = newUserCaches;
}