Skip to content

Commit d5056e0

Browse files
authored
Merge pull request #10 from codebar-ag/feature-updated
Feature Updated Cache
2 parents 6705c0a + c370f21 commit d5056e0

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,40 @@ 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
];
91+
```
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.
8598
99+
```php
100+
'instagram' => [
101+
'driver' => 'file',
102+
'path' => storage_path('instagram/cache/data'),
103+
],
104+
````
105+
106+
Add the following to your `.gitignore` file:
107+
108+
```bash
109+
/storage/instagram/
86110
```
111+
87112
You should finally add the following to your .env file:
88113

89114
```env
90115
INSTAGRAM_CLIENT_ID=your-client-id
91116
INSTAGRAM_CLIENT_SECRET=your-client-secret
117+
INSTAGRAM_CACHE_STORE=instagram
92118
```
93119

94120
## 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)