File tree Expand file tree Collapse file tree 6 files changed +9
-15
lines changed Expand file tree Collapse file tree 6 files changed +9
-15
lines changed Original file line number Diff line number Diff line change 2
2
3
3
All Notable changes to ` laravel-search-console ` will be documented in this file.
4
4
5
+ ## [ 1.1.0] - 2017-10-12
6
+ - Clear Cache on setAccessToken()
7
+
5
8
## [ 1.0.0] - 2017-10-06
6
9
- change default cache to null
7
10
- First stable release
Original file line number Diff line number Diff line change @@ -96,15 +96,11 @@ return [
96
96
| use to store it's data. You may also add extra parameters that will
97
97
| be passed on setCacheConfig (see docs for google-api-php-client).
98
98
|
99
- | WARNING: Don't enable cache if you handling with more than one access token.
100
- | Google itself removed underlying cache library till they can fix the issue.
101
- |
102
- | store parameter: null, file
103
99
| Optional parameters: "lifetime", "prefix"
104
100
*/
105
101
106
102
'cache' => [
107
- 'store' => null ,
103
+ 'store' => file ,
108
104
],
109
105
110
106
/*
Original file line number Diff line number Diff line change 47
47
| use to store it's data. You may also add extra parameters that will
48
48
| be passed on setCacheConfig (see docs for google-api-php-client).
49
49
|
50
- | WARNING: Don't enable cache if you handling with more than one access token.
51
- | Google itself removed underlying cache library till they can fix the issue.
52
- |
53
- | store parameter: null, file
54
50
| Optional parameters: "lifetime", "prefix"
55
51
*/
56
52
57
53
'cache ' => [
58
- 'store ' => null ,
54
+ 'store ' => ' file ' ,
59
55
],
60
56
61
57
/*
Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ public function setAccessToken(string $accessToken)
41
41
{
42
42
$ this ->client ->setAccessToken ($ accessToken );
43
43
44
+ $ this ->client ->getGoogleClient ()->getCache ()->clear ();
45
+
44
46
return $ this ;
45
47
}
46
48
Original file line number Diff line number Diff line change @@ -45,9 +45,6 @@ public static function createAuthenticatedGoogleClient(array $config): Google_Cl
45
45
*/
46
46
protected static function configureCache (Google_Client $ client , $ config )
47
47
{
48
- if (is_null ($ config ['store ' ])) {
49
- return ;
50
- }
51
48
$ config = collect ($ config );
52
49
53
50
$ store = \Cache::store ($ config ->get ('store ' ));
Original file line number Diff line number Diff line change @@ -30,11 +30,11 @@ public function register()
30
30
31
31
$ searchConsoleConfig = config ('search-console ' );
32
32
33
- $ this ->app ->singleton (SearchConsoleClient::class, function () use ($ searchConsoleConfig ) {
33
+ $ this ->app ->bind (SearchConsoleClient::class, function () use ($ searchConsoleConfig ) {
34
34
return SearchConsoleClientFactory::createForConfig ($ searchConsoleConfig );
35
35
});
36
36
37
- $ this ->app ->singleton (SearchConsole::class, function () use ($ searchConsoleConfig ) {
37
+ $ this ->app ->bind (SearchConsole::class, function () use ($ searchConsoleConfig ) {
38
38
$ this ->guardAgainstInvalidConfiguration ($ searchConsoleConfig );
39
39
40
40
$ client = app (SearchConsoleClient::class);
You can’t perform that action at this time.
0 commit comments