biigle / laravel-cached-openstack
A wrapper for the OpenStack SDK that caches and renews the authentication token
Installs: 59 411
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 5
Open Issues: 0
pkg:composer/biigle/laravel-cached-openstack
Requires
- illuminate/cache: ^5.1 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0
- php-opencloud/openstack: ^3.0 || ^3.2
Requires (Dev)
- vimeo/psalm: ^4.12
README
A wrapper for the OpenStack SDK that caches and renews the authentication token. Works with Laravel and Lumen.
The wrapper is specifically intended for use in long running daemon queue workers as it renews the cached authentication token automatically.
Installation
composer require biigle/laravel-cached-openstack
Usage
use Biigle\CachedOpenStack\OpenStack; $cache = app('cache'); $options = [ // OpenStack options... ]; $openstack = new OpenStack($cache, $options);
Options
You can include cache options in the OpenStack options array. Example:
$options = [ 'cacheOptions' => [ 'ttl' => 3600, ], ]; $openstack = new OpenStack($cache, $options);
Available options:
- ttl: Overrides the duration that the authentication token should be cached in seconds. If not set, the token is cached until its- expires_atminus 60 seconds. If- expires_atis less than the specified- ttl,- ttlis ignored.