PHPackages                             tokenly/credits-cache - 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. [Caching](/categories/caching)
4. /
5. tokenly/credits-cache

ActiveLibrary[Caching](/categories/caching)

tokenly/credits-cache
=====================

A library to cache app credits locally. Requires Laravel.

11.1kPHPCI failing

Since May 7Pushed 6y ago3 watchersCompare

[ Source](https://github.com/tokenly/credits-cache)[ Packagist](https://packagist.org/packages/tokenly/credits-cache)[ RSS](/packages/tokenly-credits-cache/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Build Status](https://camo.githubusercontent.com/4c0a66781c2096008071daa4391893d79230b1d4e09448db7cdf33f5df08700f/68747470733a2f2f7472617669732d63692e6f72672f746f6b656e6c792f637265646974732d63616368652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tokenly/credits-cache)

App Credits Cache
-----------------

[](#app-credits-cache)

A library to cache Tokenpass app credits locally. Requires Laravel.

Installation
------------

[](#installation)

- `composer require tokenly/credits-cache`
- Add `Tokenly\CreditsCache\CreditBalanceCacheProvider::class` to your list of service providers

Usage
-----

[](#usage)

### Fetching a balance

[](#fetching-a-balance)

```
$credits_cache = app(\Tokenly\CreditsCache\CreditBalanceCache::class);
$credit_balance = $credits_cache->getCredits($credits_group_id, $user_account_uuid);
```

If no local cache balance is present, the cache will call the Tokenpass API and populate it.

### Clearing the cache

[](#clearing-the-cache)

To clear the local cache, fire a CreditBalanceChanged event. This will force a reload from Tokenpass on the next `getCredits` call.

```
use Tokenly\CreditsCache\CreditBalanceChanged;

event(new CreditBalanceChanged($credits_group_id, $user_account_uuid));
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b86e6a54873d5dd61d3682a3be00127af3b7b2b5c53eb070b160e29789d4c0d?d=identicon)[dweller](/maintainers/dweller)

---

Top Contributors

[![cryptonaut420](https://avatars.githubusercontent.com/u/8463048?v=4)](https://github.com/cryptonaut420 "cryptonaut420 (1 commits)")[![deweller](https://avatars.githubusercontent.com/u/51414?v=4)](https://github.com/deweller "deweller (1 commits)")

### Embed Badge

![Health badge](/badges/tokenly-credits-cache/health.svg)

```
[![Health](https://phpackages.com/badges/tokenly-credits-cache/health.svg)](https://phpackages.com/packages/tokenly-credits-cache)
```

###  Alternatives

[iazaran/smart-cache

Smart Cache is a caching optimization package designed to enhance the way your Laravel application handles data caching. It intelligently manages large data sets by compressing, chunking, or applying other optimization strategies to keep your application performant and efficient.

21114.2k](/packages/iazaran-smart-cache)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
