{"adoption": {"forks": 62, "observed_at": "2026-08-28T04:04:45.275374+00:00", "stars": 1446}, "canonical_url": "https://ross.abutalabs.com/products/spatie-once", "card": {"archived": false, "artifact_type": "library", "description": "A magic memoization function", "domain": ["developer-tools", "performance"], "enriched": true, "function": ["caching"], "health_score": 91, "homepage": "https://spatie.be/opensource", "language": "PHP", "license": "MIT", "license_family": "permissive", "maturity": "stable", "member_repos": ["spatie/once"], "name": "spatie/once", "platform": ["php"], "pushed_at": "2026-07-09T10:50:27+00:00", "repo": "spatie/once", "stars": 1446, "tags": ["memoization", "weakmap", "per-request-cache"], "topics": ["php", "cache", "performance", "magic"], "urls": [], "use_cases": ["memoize expensive method calls in php", "cache a function result per object instance", "avoid recomputing values within the same request", "memoize static methods with argument-specific results", "run a callable only once per argument combination"], "what_it_is": "A small PHP package providing a magic `once()` memoization function that caches a callable's result per object instance and argument combination using PHP 8 WeakMaps. It ensures expensive computations run only once per request lifecycle.", "when_to_avoid": ["you need persistent or cross-request caching (use Redis, APCu, or Laravel cache)", "you target PHP versions older than 8.0", "you need cache invalidation or TTL semantics"], "when_to_choose": ["you need lightweight per-object memoization in PHP 8+", "you want results cached only for the current request without a global cache", "you need argument-aware memoization including static contexts"]}, "data_as_of": "2026-08-30T08:39:29.467469+00:00", "members": [{"path": "/products/spatie-once", "repo": "spatie/once", "role": "main", "score": 70}], "provenance": {"archived": {"kind": "observed", "observed_at": "2026-08-28T04:04:45.275374+00:00", "source": "github"}, "artifact_type": {"confidence": null, "enriched_at": "2026-08-30T04:36:11.482889+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "edb18e7db8cbccc7360fe9e09f8e4bef42cb9def7515966e2c2bc2bc15742bfd", "fetched_at": "2026-08-28T04:04:45.275374+00:00", "kind": "readme", "missing": false, "url": "https://github.com/spatie/once"}, {"content_hash": "4a0ae7f7c9b67f686bd2404c1440d0c76e1119903af24daa175ef22ce3ac9a24", "fetched_at": "2026-08-29T11:46:03.122706+00:00", "kind": "homepage", "missing": false, "url": "https://spatie.be/opensource"}, {"content_hash": "08e024d86d95c41664c322c41f72dd4ffbdb77bdb2593df69b7da9257528b182", "fetched_at": "2026-08-29T11:46:03.125594+00:00", "kind": "site_page", "missing": false, "url": "https://spatie.be/docs"}, {"content_hash": "d3cb88e4b34c8f48a454735b613f7e1bc733398952e9c21cf4046bbeaa923d24", "fetched_at": "2026-08-29T11:46:03.127767+00:00", "kind": "site_page", "missing": false, "url": "https://spatie.be/about-us"}], "taxonomy_version": 1}, "description": {"kind": "observed", "observed_at": "2026-08-28T04:04:45.275374+00:00", "source": "github"}, "domain": {"confidence": null, "enriched_at": "2026-08-30T04:36:11.482889+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "edb18e7db8cbccc7360fe9e09f8e4bef42cb9def7515966e2c2bc2bc15742bfd", "fetched_at": "2026-08-28T04:04:45.275374+00:00", "kind": "readme", "missing": false, "url": "https://github.com/spatie/once"}, {"content_hash": "4a0ae7f7c9b67f686bd2404c1440d0c76e1119903af24daa175ef22ce3ac9a24", "fetched_at": "2026-08-29T11:46:03.122706+00:00", "kind": "homepage", "missing": false, "url": "https://spatie.be/opensource"}, {"content_hash": "08e024d86d95c41664c322c41f72dd4ffbdb77bdb2593df69b7da9257528b182", "fetched_at": "2026-08-29T11:46:03.125594+00:00", "kind": "site_page", "missing": false, "url": "https://spatie.be/docs"}, {"content_hash": "d3cb88e4b34c8f48a454735b613f7e1bc733398952e9c21cf4046bbeaa923d24", "fetched_at": "2026-08-29T11:46:03.127767+00:00", "kind": "site_page", "missing": false, "url": "https://spatie.be/about-us"}], "taxonomy_version": 1}, "enriched": {"inputs": [], "kind": "computed", "method": "enrichment_status"}, "function": {"confidence": null, "enriched_at": "2026-08-30T04:36:11.482889+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "edb18e7db8cbccc7360fe9e09f8e4bef42cb9def7515966e2c2bc2bc15742bfd", "fetched_at": "2026-08-28T04:04:45.275374+00:00", "kind": "readme", "missing": false, "url": "https://github.com/spatie/once"}, {"content_hash": "4a0ae7f7c9b67f686bd2404c1440d0c76e1119903af24daa175ef22ce3ac9a24", "fetched_at": "2026-08-29T11:46:03.122706+00:00", "kind": "homepage", "missing": false, "url": "https://spatie.be/opensource"}, {"content_hash": "08e024d86d95c41664c322c41f72dd4ffbdb77bdb2593df69b7da9257528b182", "fetched_at": "2026-08-29T11:46:03.125594+00:00", "kind": "site_page", "missing": false, "url": "https://spatie.be/docs"}, {"content_hash": "d3cb88e4b34c8f48a454735b613f7e1bc733398952e9c21cf4046bbeaa923d24", "fetched_at": "2026-08-29T11:46:03.127767+00:00", "kind": "site_page", "missing": false, "url": "https://spatie.be/about-us"}], "taxonomy_version": 1}, "health_score": {"inputs": ["days_since_push", "days_since_release", "archived"], "kind": "computed", "method": "health_v1"}, "homepage": {"kind": "observed", "observed_at": "2026-08-28T04:04:45.275374+00:00", "source": "github"}, "language": {"kind": "observed", "observed_at": "2026-08-28T04:04:45.275374+00:00", "source": "github"}, "license": {"kind": "observed", "observed_at": "2026-08-28T04:04:45.275374+00:00", "source": "github"}, "license_family": {"inputs": ["license"], "kind": "computed", "method": "license_family"}, "maturity": {"confidence": null, "enriched_at": "2026-08-30T04:36:11.482889+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "edb18e7db8cbccc7360fe9e09f8e4bef42cb9def7515966e2c2bc2bc15742bfd", "fetched_at": "2026-08-28T04:04:45.275374+00:00", "kind": "readme", "missing": false, "url": "https://github.com/spatie/once"}, {"content_hash": "4a0ae7f7c9b67f686bd2404c1440d0c76e1119903af24daa175ef22ce3ac9a24", "fetched_at": "2026-08-29T11:46:03.122706+00:00", "kind": "homepage", "missing": false, "url": "https://spatie.be/opensource"}, {"content_hash": "08e024d86d95c41664c322c41f72dd4ffbdb77bdb2593df69b7da9257528b182", "fetched_at": "2026-08-29T11:46:03.125594+00:00", "kind": "site_page", "missing": false, "url": "https://spatie.be/docs"}, {"content_hash": "d3cb88e4b34c8f48a454735b613f7e1bc733398952e9c21cf4046bbeaa923d24", "fetched_at": "2026-08-29T11:46:03.127767+00:00", "kind": "site_page", "missing": false, "url": "https://spatie.be/about-us"}], "taxonomy_version": 1}, "member_repos": {"kind": "observed", "observed_at": "2026-08-28T04:04:45.275374+00:00", "source": "github"}, "name": {"kind": "observed", "observed_at": "2026-08-28T04:04:45.275374+00:00", "source": "github"}, "platform": {"confidence": null, "enriched_at": "2026-08-30T04:36:11.482889+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "edb18e7db8cbccc7360fe9e09f8e4bef42cb9def7515966e2c2bc2bc15742bfd", "fetched_at": "2026-08-28T04:04:45.275374+00:00", "kind": "readme", "missing": false, "url": "https://github.com/spatie/once"}, {"content_hash": "4a0ae7f7c9b67f686bd2404c1440d0c76e1119903af24daa175ef22ce3ac9a24", "fetched_at": "2026-08-29T11:46:03.122706+00:00", "kind": "homepage", "missing": false, "url": "https://spatie.be/opensource"}, {"content_hash": "08e024d86d95c41664c322c41f72dd4ffbdb77bdb2593df69b7da9257528b182", "fetched_at": "2026-08-29T11:46:03.125594+00:00", "kind": "site_page", "missing": false, "url": "https://spatie.be/docs"}, {"content_hash": "d3cb88e4b34c8f48a454735b613f7e1bc733398952e9c21cf4046bbeaa923d24", "fetched_at": "2026-08-29T11:46:03.127767+00:00", "kind": "site_page", "missing": false, "url": "https://spatie.be/about-us"}], "taxonomy_version": 1}, "pushed_at": {"kind": "observed", "observed_at": "2026-08-28T04:04:45.275374+00:00", "source": "github"}, "repo": {"kind": "observed", "observed_at": "2026-08-28T04:04:45.275374+00:00", "source": "github"}, "stars": {"kind": "observed", "observed_at": "2026-08-28T04:04:45.275374+00:00", "source": "github"}, "tags": {"confidence": null, "enriched_at": "2026-08-30T04:36:11.482889+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "edb18e7db8cbccc7360fe9e09f8e4bef42cb9def7515966e2c2bc2bc15742bfd", "fetched_at": "2026-08-28T04:04:45.275374+00:00", "kind": "readme", "missing": false, "url": "https://github.com/spatie/once"}, {"content_hash": "4a0ae7f7c9b67f686bd2404c1440d0c76e1119903af24daa175ef22ce3ac9a24", "fetched_at": "2026-08-29T11:46:03.122706+00:00", "kind": "homepage", "missing": false, "url": "https://spatie.be/opensource"}, {"content_hash": "08e024d86d95c41664c322c41f72dd4ffbdb77bdb2593df69b7da9257528b182", "fetched_at": "2026-08-29T11:46:03.125594+00:00", "kind": "site_page", "missing": false, "url": "https://spatie.be/docs"}, {"content_hash": "d3cb88e4b34c8f48a454735b613f7e1bc733398952e9c21cf4046bbeaa923d24", "fetched_at": "2026-08-29T11:46:03.127767+00:00", "kind": "site_page", "missing": false, "url": "https://spatie.be/about-us"}], "taxonomy_version": 1}, "topics": {"kind": "observed", "observed_at": "2026-08-28T04:04:45.275374+00:00", "source": "github"}, "urls": {"kind": "observed", "observed_at": "2026-08-28T04:04:45.275374+00:00", "source": "github"}, "use_cases": {"confidence": null, "enriched_at": "2026-08-30T04:36:11.482889+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "edb18e7db8cbccc7360fe9e09f8e4bef42cb9def7515966e2c2bc2bc15742bfd", "fetched_at": "2026-08-28T04:04:45.275374+00:00", "kind": "readme", "missing": false, "url": "https://github.com/spatie/once"}, {"content_hash": "4a0ae7f7c9b67f686bd2404c1440d0c76e1119903af24daa175ef22ce3ac9a24", "fetched_at": "2026-08-29T11:46:03.122706+00:00", "kind": "homepage", "missing": false, "url": "https://spatie.be/opensource"}, {"content_hash": "08e024d86d95c41664c322c41f72dd4ffbdb77bdb2593df69b7da9257528b182", "fetched_at": "2026-08-29T11:46:03.125594+00:00", "kind": "site_page", "missing": false, "url": "https://spatie.be/docs"}, {"content_hash": "d3cb88e4b34c8f48a454735b613f7e1bc733398952e9c21cf4046bbeaa923d24", "fetched_at": "2026-08-29T11:46:03.127767+00:00", "kind": "site_page", "missing": false, "url": "https://spatie.be/about-us"}], "taxonomy_version": 1}, "what_it_is": {"confidence": null, "enriched_at": "2026-08-30T04:36:11.482889+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "edb18e7db8cbccc7360fe9e09f8e4bef42cb9def7515966e2c2bc2bc15742bfd", "fetched_at": "2026-08-28T04:04:45.275374+00:00", "kind": "readme", "missing": false, "url": "https://github.com/spatie/once"}, {"content_hash": "4a0ae7f7c9b67f686bd2404c1440d0c76e1119903af24daa175ef22ce3ac9a24", "fetched_at": "2026-08-29T11:46:03.122706+00:00", "kind": "homepage", "missing": false, "url": "https://spatie.be/opensource"}, {"content_hash": "08e024d86d95c41664c322c41f72dd4ffbdb77bdb2593df69b7da9257528b182", "fetched_at": "2026-08-29T11:46:03.125594+00:00", "kind": "site_page", "missing": false, "url": "https://spatie.be/docs"}, {"content_hash": "d3cb88e4b34c8f48a454735b613f7e1bc733398952e9c21cf4046bbeaa923d24", "fetched_at": "2026-08-29T11:46:03.127767+00:00", "kind": "site_page", "missing": false, "url": "https://spatie.be/about-us"}], "taxonomy_version": 1}, "when_to_avoid": {"confidence": null, "enriched_at": "2026-08-30T04:36:11.482889+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "edb18e7db8cbccc7360fe9e09f8e4bef42cb9def7515966e2c2bc2bc15742bfd", "fetched_at": "2026-08-28T04:04:45.275374+00:00", "kind": "readme", "missing": false, "url": "https://github.com/spatie/once"}, {"content_hash": "4a0ae7f7c9b67f686bd2404c1440d0c76e1119903af24daa175ef22ce3ac9a24", "fetched_at": "2026-08-29T11:46:03.122706+00:00", "kind": "homepage", "missing": false, "url": "https://spatie.be/opensource"}, {"content_hash": "08e024d86d95c41664c322c41f72dd4ffbdb77bdb2593df69b7da9257528b182", "fetched_at": "2026-08-29T11:46:03.125594+00:00", "kind": "site_page", "missing": false, "url": "https://spatie.be/docs"}, {"content_hash": "d3cb88e4b34c8f48a454735b613f7e1bc733398952e9c21cf4046bbeaa923d24", "fetched_at": "2026-08-29T11:46:03.127767+00:00", "kind": "site_page", "missing": false, "url": "https://spatie.be/about-us"}], "taxonomy_version": 1}, "when_to_choose": {"confidence": null, "enriched_at": "2026-08-30T04:36:11.482889+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "edb18e7db8cbccc7360fe9e09f8e4bef42cb9def7515966e2c2bc2bc15742bfd", "fetched_at": "2026-08-28T04:04:45.275374+00:00", "kind": "readme", "missing": false, "url": "https://github.com/spatie/once"}, {"content_hash": "4a0ae7f7c9b67f686bd2404c1440d0c76e1119903af24daa175ef22ce3ac9a24", "fetched_at": "2026-08-29T11:46:03.122706+00:00", "kind": "homepage", "missing": false, "url": "https://spatie.be/opensource"}, {"content_hash": "08e024d86d95c41664c322c41f72dd4ffbdb77bdb2593df69b7da9257528b182", "fetched_at": "2026-08-29T11:46:03.125594+00:00", "kind": "site_page", "missing": false, "url": "https://spatie.be/docs"}, {"content_hash": "d3cb88e4b34c8f48a454735b613f7e1bc733398952e9c21cf4046bbeaa923d24", "fetched_at": "2026-08-29T11:46:03.127767+00:00", "kind": "site_page", "missing": false, "url": "https://spatie.be/about-us"}], "taxonomy_version": 1}}, "score": {"components": {"activity": 91, "longevity": 100, "rhythm": 26}, "computed_at": "2026-09-03T02:20:16.233290+00:00", "flags": [], "formula": "round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)", "inputs": {"age_days": 3587, "days_push": 55, "days_rel": 281, "gap_med": null, "n_releases_24m": 1}, "score": 70, "version": 2}, "staleness": {"enrichment_outdated": false, "low_confidence": false, "scrape_days": 9, "stale_scrape": false}}