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 2mo 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

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity33

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

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)

PHPackages © 2026

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