clearContentLayerCache() — astro Function Reference
Architecture documentation for the clearContentLayerCache() function in index.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD ebbcc9b9_f924_1665_6add_14c952f74341["clearContentLayerCache()"] cd488d83_5ad0_f34a_227f_731e9945a152["index.ts"] ebbcc9b9_f924_1665_6add_14c952f74341 -->|defined in| cd488d83_5ad0_f34a_227f_731e9945a152 2523437b_c067_5714_7895_f8fb9bc10862["syncInternal()"] 2523437b_c067_5714_7895_f8fb9bc10862 -->|calls| ebbcc9b9_f924_1665_6add_14c952f74341 style ebbcc9b9_f924_1665_6add_14c952f74341 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/core/sync/index.ts lines 87–104
export async function clearContentLayerCache({
settings,
logger,
fs = fsMod,
isDev,
}: {
settings: AstroSettings;
logger: Logger;
fs?: typeof fsMod;
isDev: boolean;
}) {
const dataStore = getDataStoreFile(settings, isDev);
if (fs.existsSync(dataStore)) {
logger.debug('content', 'clearing data store');
await fs.promises.rm(dataStore, { force: true });
logger.warn('content', 'data store cleared (force)');
}
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does clearContentLayerCache() do?
clearContentLayerCache() is a function in the astro codebase, defined in packages/astro/src/core/sync/index.ts.
Where is clearContentLayerCache() defined?
clearContentLayerCache() is defined in packages/astro/src/core/sync/index.ts at line 87.
What calls clearContentLayerCache()?
clearContentLayerCache() is called by 1 function(s): syncInternal.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free