Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Once Laravel Package

spatie/once

A tiny PHP helper to run code only once per request. Cache expensive computations or object initialization in a single spot, keyed automatically by the call site. Great for computed properties, accessors, and avoiding duplicate work.

View on GitHub
Deep Wiki
Context7
3.1.2

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/once/compare/3.1.1...3.1.2

3.1.1

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/once/compare/3.1.0...3.1.1

3.1.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/once/compare/3.0.2...3.1.0

3.0.2
3.0.1
  • fix for caching static functions of different classes with the same name (#62)
3.0.0
  • refactor to use a WeakMap
  • drop support for PHP 7
2.2.1
  • allow PHP 8
2.2.0
  • Support global functions
2.1.3
  • differentiate between closures (#42)
2.1.2
  • remove excess parameter in get on cache
2.1.1
  • do not throw an error when using once in eval
2.1.0
  • add enabling/disable the cache
  • add flush method
  • drop support for PHP 7.1 and below
2.0.2
  • add ability to use once in static functions
2.0.1
  • improvements around serialization
2.0.0
  • ditch __memoized in favor of Spatie\Once\Cache
1.1.0
  • add MemoizeAwareTrait
1.0.1

fix cacheability of falsy return values

1.0.0

initial release

0.0.1

experimental release

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer
emarref/xdebug-bundle
emarref/pubnub-bundle
elriseio/finance-money-bundle