MCPcopy Create free account
hub / github.com/SpecterOps/Nemesis / getStats

Method getStats

projects/frontend/src/utils/fileCache.js:126–142  ·  view source on GitHub ↗

* Get cache statistics

()

Source from the content-addressed store, hash-verified

124 * Get cache statistics
125 */
126 getStats() {
127 const entries = Array.from(this.cache.entries()).map(([key, entry]) => ({
128 key,
129 size: entry.size,
130 age: Date.now() - entry.timestamp,
131 valid: this.isValid(entry)
132 }));
133
134 const totalSize = entries.reduce((sum, e) => sum + e.size, 0);
135
136 return {
137 entryCount: this.cache.size,
138 maxSize: this.maxSize,
139 totalSize,
140 entries
141 };
142 }
143}
144
145// Create singleton instance

Callers

nothing calls this directly

Calls 1

isValidMethod · 0.95

Tested by

no test coverage detected