diff --git a/README.md b/README.md index ac8aa94..1b2f62c 100755 --- a/README.md +++ b/README.md @@ -81,14 +81,40 @@ return [ * This is not the same as an access token. */ 'client_secret' => env('INSTAGRAM_CLIENT_SECRET', null), + + /* + * The cache_store to use for caching the authenticator and authenticated user. + * This should not be the same as your default cache store. + */ + 'cache_store' => env('INSTAGRAM_CACHE_STORE', env('CACHE_DRIVER', 'file')), ]; +``` + +You should now create a cache store in your `config/cache.php` file: + +> NOTE: This cache store should NOT be the same as your default cache store. If you use your default cache store, you will lose the Instagram Authentication when you clear your cache and the user will need to re-authenticate. + +> You can use any driver you like as long as it is different from your default cache store, or it has a separate table or path. +```php +'instagram' => [ + 'driver' => 'file', + 'path' => storage_path('instagram/cache/data'), +], +```` + +Add the following to your `.gitignore` file: + +```bash +/storage/instagram/ ``` + You should finally add the following to your .env file: ```env INSTAGRAM_CLIENT_ID=your-client-id INSTAGRAM_CLIENT_SECRET=your-client-secret +INSTAGRAM_CACHE_STORE=instagram ``` ## Creating a new Instagram App diff --git a/config/instagram.php b/config/instagram.php index 0f3dc34..4840ae4 100755 --- a/config/instagram.php +++ b/config/instagram.php @@ -12,4 +12,10 @@ * This is not the same as an access token. */ 'client_secret' => env('INSTAGRAM_CLIENT_SECRET', null), + + /* + * The cache_store to use for caching the authenticator and authenticated user. + * This should not be the same as your default cache store. + */ + 'cache_store' => env('INSTAGRAM_CACHE_STORE', env('CACHE_DRIVER', 'file')), ];