MCPcopy Create free account
hub / github.com/Effect-TS/effect / size

Function size

packages/effect/src/ScopedCache.ts:719–720  ·  view source on GitHub ↗
(self: ScopedCache<Key, A, E, R>)

Source from the content-addressed store, hash-verified

717 * @since 4.0.0
718 */
719export const size = <Key, A, E, R>(self: ScopedCache<Key, A, E, R>): Effect.Effect<number> =>
720 effect.sync(() => self.state._tag === "Closed" ? 0 : MutableHashMap.size(self.state.map))
721
722/**
723 * Retrieves all active keys from the cache, automatically filtering out expired entries.

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.65
syncMethod · 0.45

Tested by

no test coverage detected