File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed
Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,9 @@ class Builder extends BaseBuilder implements QueryCacheModuleInterface
1515 */
1616 public function get ($ columns = ['* ' ])
1717 {
18- if (! $ this ->shouldAvoidCache ()) {
19- return $ this ->getFromQueryCache ('get ' , $ columns );
20- }
21-
22- return parent ::get ($ columns );
18+ return $ this ->shouldAvoidCache ()
19+ ? parent ::get ($ columns )
20+ : $ this ->getFromQueryCache ('get ' , $ columns );
2321 }
2422
2523 /**
Original file line number Diff line number Diff line change @@ -57,11 +57,9 @@ protected function newBaseQueryBuilder()
5757 $ connection ->getPostProcessor ()
5858 );
5959
60- if ($ this ->cacheFor ) {
61- $ builder ->cacheFor ($ this ->cacheFor );
62- } else {
63- $ builder ->dontCache ();
64- }
60+ $ this ->cacheFor
61+ ? $ builder ->cacheFor ($ this ->cacheFor )
62+ : $ builder ->dontCache ();
6563
6664 if ($ this ->cacheTags ) {
6765 $ builder ->cacheTags ($ this ->cacheTags );
@@ -79,8 +77,7 @@ protected function newBaseQueryBuilder()
7977 $ builder ->withPlainKey ();
8078 }
8179
82- return $ builder
83- ->cacheBaseTags ($ this ->getCacheBaseTags ());
80+ return $ builder ->cacheBaseTags ($ this ->getCacheBaseTags ());
8481 }
8582
8683 /**
You can’t perform that action at this time.
0 commit comments