PHPackages                             aportela/simple-throttle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. aportela/simple-throttle

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

aportela/simple-throttle
========================

Custom php throttle system

1.0.3(5mo ago)0863AGPL-3.0-onlyPHPPHP &gt;=8.4CI passing

Since Nov 1Pushed 5mo agoCompare

[ Source](https://github.com/aportela/simple-throttle)[ Packagist](https://packagist.org/packages/aportela/simple-throttle)[ Docs](https://github.com/aportela/simple-throttle)[ RSS](/packages/aportela-simple-throttle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (5)Versions (5)Used By (3)

simple-throttle
===============

[](#simple-throttle)

This is a simple approach to implement exponential backoff for retrying operations that may fail intermittently, such as network requests (API calls?) or file access. While there are more robust and optimized solutions out there, this is just a lightweight strategy I use in some of my personal projects when I need to handle temporary failures without overcomplicating things. It’s not meant for production-grade systems, just a basic solution for my use cases.

Requirements
------------

[](#requirements)

- mininum php version 8.4

Install (composer) dependencies:
--------------------------------

[](#install-composer-dependencies)

```
composer require aportela/simple-throttle
```

Code example:
-------------

[](#code-example)

```
