Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

3. Data Sharing

Albert Chen edited this page Apr 29, 2018 · 11 revisions

Data Sharing

Like what I said in the structure chapter, Laravel applications runs in different worker processes. There's one important concept you need to understand: Variables can not shared across different processes.

Each worker will have their own varaibles and memory allocations. So keeping Laravel in memory doesn't mean you can share data among different processes.

You have few options if you really want to do in this package:

  • Databases like MySQL or Redis
  • APCu - APC User Cache
  • Swoole Table
  • Any other I/O based alternatives

Clone this wiki locally