{"repo":"mpyw/laravel-cached-database-stickiness","free":true,"listed":false,"github":"https://github.com/mpyw/laravel-cached-database-stickiness","clone":"git clone https://github.com/mpyw/laravel-cached-database-stickiness.git","description":"Guarantee database stickiness over the same user's consecutive requests","language":"PHP","stars":83,"topics":["php","laravel","eloquent","database","sticky","redis"],"license":"MIT","category":"databases-storage","readme_excerpt":"Laravel Cached Database Stickiness Guarantee database stickiness over the same user's consecutive requests. Requirements - PHP: ^8.2 - Laravel: ^11.0 ^12.0 ^13.0 [!NOTE] Older versions have outdated dependency requirements. If you cannot prepare the latest environment, please refer to past releases. Installing [!IMPORTANT] The default implementation is provided by ConnectionServiceProvider , however, package discovery is not available . Be careful that you MUST register it in config/app.php by yourself. Then select the proper cache driver: Driver Is eligible? Description :--- :---: :--- redis 😄 Very fast, scalable and reliable driver (Cluster mode must be disabled) memcached 😄 Alternative for Redis dynamodb 😧 It works but not so suitable for short-term caching ( ConsistentRead must be enabled) apc 😧 It works unless PHP processes are running in multiple machines or containers file 😧 It works unless PHP processes are running in multiple machines or containers database 🤮 We'll get into a chicken-or-egg situation array 🤮 Just for testing Features This library provides the following features. - Make HTTP server to take over the database sticky state from the previous user's request within the last 5 seconds. - Make queue worker into referring to master by default. - Make queue worker into referring to slave by implementing ShouldAssumeFresh on your Queueable (jobs, listeners, notifications and mailables). Diagrams Default Sticky Sticky Cached Advanced Usage Customize Sticki","default_branch":null,"files":null,"tree":[],"storefront":"/r/mpyw","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mpyw/laravel-cached-database-stickiness/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}