Skip to content

Commit 698f5f3

Browse files
committed
WIP
1 parent 142d1d0 commit 698f5f3

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,34 @@ return [
8181
* This is not the same as an access token.
8282
*/
8383
'client_secret' => env('INSTAGRAM_CLIENT_SECRET', null),
84+
85+
/*
86+
* The cache_store to use for caching the authenticator and authenticated user.
87+
* This should not be the same as your default cache store.
88+
*/
89+
'cache_store' => env('INSTAGRAM_CACHE_STORE', env('CACHE_DRIVER', 'file')),
8490
];
85-
8691
```
92+
93+
You should now create a cache store in your `config/cache.php` file:
94+
95+
> 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.
96+
97+
> 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.
98+
99+
```php
100+
'instagram' => [
101+
'driver' => 'file',
102+
'path' => storage_path('instagram/cache/data'),
103+
],
104+
````
105+
87106
You should finally add the following to your .env file:
88107

89108
```env
90109
INSTAGRAM_CLIENT_ID=your-client-id
91110
INSTAGRAM_CLIENT_SECRET=your-client-secret
111+
INSTAGRAM_CACHE_STORE=instagram
92112
```
93113

94114
## Creating a new Instagram App

config/instagram.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,10 @@
1212
* This is not the same as an access token.
1313
*/
1414
'client_secret' => env('INSTAGRAM_CLIENT_SECRET', null),
15+
16+
/*
17+
* The cache_store to use for caching the authenticator and authenticated user.
18+
* This should not be the same as your default cache store.
19+
*/
20+
'cache_store' => env('INSTAGRAM_CACHE_STORE', env('CACHE_DRIVER', 'file')),
1521
];

0 commit comments

Comments
 (0)