-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Li Zhineng edited this page Dec 7, 2023
·
5 revisions
The Tablestore driver extends your Laravel cache on top of Alibaba Cloud Tablestore, a serverless storage service with unlimited storage, the ability to query and retrieve items in milliseconds, and frees you from infrastructure maintenance.
You can install the package into the application using Composer:
composer require dew-serverless/laravel-tablestore-driver
Add a new cache store in your config/cache.php
file:
return [
// Define with Tablestore driver in stores
'tablestore' => [
'driver' => 'tablestore',
'key' => env('ACS_ACCESS_KEY_ID'),
'secret' => env('ACS_ACCESS_KEY_SECRET'),
'endpoint' => env('TABLESTORE_ENDPOINT'),
'instance' => env('TABLESTORE_INSTANCE'),
'table' => env('TABLESTORE_CACHE', 'cache'),
],
];
And you're all set. The cache items will be stored to and queried from the
Tablestore instance when you specify the store with
Cache::driver('tablestore')
or you may set it to the default one.