dev-master
9999999-devA library to cache app credits locally. Requires Laravel.
MIT
The Requires
- php >=5.5.0
The Development Requires
by Devon Weller
A library to cache app credits locally. Requires Laravel.
A library to cache Tokenpass app credits locally. Requires Laravel., (*2)
composer require tokenly/credits-cache
Tokenly\CreditsCache\CreditBalanceCacheProvider::class
to your list of service providers$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., (*3)
To clear the local cache, fire a CreditBalanceChanged event. This will force a reload from Tokenpass on the next getCredits
call., (*4)
use Tokenly\CreditsCache\CreditBalanceChanged; event(new CreditBalanceChanged($credits_group_id, $user_account_uuid));
A library to cache app credits locally. Requires Laravel.
MIT