Laravel Octane

Some notes for Octane Applications

SaaS Ready utilises the shortage cache to save queries & DB traversal.

It is okay for regular PHP Applications because every request is independent. But it is a different story for Laravel Octane (think of Queue Worker, it is as same as that).

So if you wish your Ready's Entities need to be refreshed per every request. Please register this class to Laravel Octane hooks, ideally RequestTerminated:

// config/octane.php

RequestTerminated::class => [
    SaasReady\Services\OctaneHooks\ClearSaasReadyShortageCache::class,
],

Last updated