Added KnowledgeBase caching.