com.jivesoftware.forum.database.DbForum.setName(String name):
public void setName(String name) throws ForumAlreadyExistsException {
if (this.name.equals(name)) {
return;
}
try {
if (!this.name.toLowerCase().equals(name.toLowerCase()))
{
Forum forum = factory.getForum(name);
throw new ForumAlreadyExistsException();
}
}catch (ForumNotFoundException e) { }
factory.cacheManager.forumCache.remove(id);
this.name = name;
saveToDb();
factory.cacheManager.forumCache.remove(id);
}
代码中 Forum forum = factory.getForum(name);
factory.cacheManager.forumCache.remove(id);
这两个地方用意是什么?(我的问题可能幼稚,确实看了很久没理清。)