phasync
Manual / Resource management

Manual

Resource management

A few database connections, and one cache, shared among thousands of requests.

Introduction#

Swerve::cache() is one PSR-16 cache shared by every worker, read from local memory once a worker has seen a key. A database or API connection, by contrast, is each worker's own: open a few per worker and lend them out with phasync\Util\Pool rather than one per request. See Cache.

Concepts#

Guides#

Examples#

Reference#