29 lines
899 B
TypeScript
29 lines
899 B
TypeScript
import { Plugin } from 'vuepress/core';
|
|
|
|
interface CachePluginOptions {
|
|
/**
|
|
* Cache type
|
|
*
|
|
* - Using memory caching can achieve the best optimization effects, but the cost increases as the project grows, occupying more content, suitable for projects with fewer pages.
|
|
* - For complex projects with many pages, it is recommended to use file caching.
|
|
*
|
|
* @default 'memory'
|
|
*/
|
|
type?: 'filesystem' | 'memory';
|
|
/**
|
|
* Whether to enable the cache in CI environment.
|
|
*
|
|
* @default false
|
|
*/
|
|
enableInCi?: boolean;
|
|
}
|
|
/**
|
|
* Cache markdown rendering, optimize compilation speed.
|
|
*
|
|
* This plugin is recommended to be placed after all other plugins to ensure maximum utilization of the cache.
|
|
*/
|
|
declare const cachePlugin: ({ type, enableInCi, }?: CachePluginOptions) => Plugin;
|
|
|
|
export { cachePlugin };
|
|
export type { CachePluginOptions };
|