MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / clear

Method clear

packages/core/src/cache/FileCacheAdapter.ts:70–84  ·  view source on GitHub ↗

* @inheritDoc

()

Source from the content-addressed store, hash-verified

68 * @inheritDoc
69 */
70 clear(): void {
71 const path = this.path('*');
72 const files = fs.glob(path);
73
74 for (const file of files) {
75 /* v8 ignore next */
76 try {
77 unlinkSync(file);
78 } catch {
79 // ignore if file is already gone
80 }
81 }
82
83 this.#cache = {};
84 }
85
86 combine(): string | void {
87 if (!this.#options.combined) {

Callers

nothing calls this directly

Calls 2

pathMethod · 0.95
globMethod · 0.80

Tested by

no test coverage detected