Performance
This article describes how to improve the performance of the NgDoc application.
Cache
Cache is a feature that allows you to cache the documentation generated by the library. It does huge performance boost especially when you have a lot of documentation.
First time you run the application, it will generate all the documentation and cache it, so the next time, it will load the documentation from the cache and regenerate only the changed parts.
Enabling cache
Cache is disabled by default, but you can enable it by setting cache
option to true
in ng-doc.config.ts
file. (see
import { NgDocConfiguration } from '@ng-doc/builder';
const config : NgDocConfiguration = {
cache: true,
};
export default config ;
Cache location
Cache folder is located in node_modules/.cache/ng-doc
directory, if something goes wrong, you can delete this folder and run the application again, it will regenerate the cache.