@@ -12,10 +12,6 @@ class CachedBuilder extends EloquentBuilder
12
12
13
13
public function avg ($ column )
14
14
{
15
- if (! $ this ->isCachable ) {
16
- return parent ::avg ($ column );
17
- }
18
-
19
15
$ arguments = func_get_args ();
20
16
$ cacheKey = $ this ->makeCacheKey (['* ' ], null , "-avg_ {$ column }" );
21
17
$ method = 'avg ' ;
@@ -25,10 +21,6 @@ public function avg($column)
25
21
26
22
public function count ($ columns = ['* ' ])
27
23
{
28
- if (! $ this ->isCachable ) {
29
- return parent ::count ($ columns );
30
- }
31
-
32
24
$ arguments = func_get_args ();
33
25
$ cacheKey = $ this ->makeCacheKey (['* ' ], null , "-count " );
34
26
$ method = 'count ' ;
@@ -38,10 +30,6 @@ public function count($columns = ['*'])
38
30
39
31
public function cursor ()
40
32
{
41
- if (! $ this ->isCachable ) {
42
- return collect (parent ::cursor ());
43
- }
44
-
45
33
$ arguments = func_get_args ();
46
34
$ cacheKey = $ this ->makeCacheKey (['* ' ], null , "-cursor " );
47
35
$ method = 'cursor ' ;
@@ -62,10 +50,6 @@ public function delete()
62
50
*/
63
51
public function find ($ id , $ columns = ['* ' ])
64
52
{
65
- if (! $ this ->isCachable ) {
66
- return parent ::find ($ id , $ columns );
67
- }
68
-
69
53
$ arguments = func_get_args ();
70
54
$ cacheKey = $ this ->makeCacheKey ($ columns );
71
55
$ method = 'find ' ;
@@ -75,10 +59,6 @@ public function find($id, $columns = ['*'])
75
59
76
60
public function first ($ columns = ['* ' ])
77
61
{
78
- if (! $ this ->isCachable ) {
79
- return parent ::first ($ columns );
80
- }
81
-
82
62
$ arguments = func_get_args ();
83
63
$ cacheKey = $ this ->makeCacheKey ($ columns );
84
64
$ method = 'first ' ;
@@ -88,10 +68,6 @@ public function first($columns = ['*'])
88
68
89
69
public function get ($ columns = ['* ' ])
90
70
{
91
- if (! $ this ->isCachable ) {
92
- return parent ::get ($ columns );
93
- }
94
-
95
71
$ arguments = func_get_args ();
96
72
$ cacheKey = $ this ->makeCacheKey ($ columns );
97
73
$ method = 'get ' ;
@@ -101,10 +77,6 @@ public function get($columns = ['*'])
101
77
102
78
public function max ($ column )
103
79
{
104
- if (! $ this ->isCachable ) {
105
- return parent ::max ($ column );
106
- }
107
-
108
80
$ arguments = func_get_args ();
109
81
$ cacheKey = $ this ->makeCacheKey (['* ' ], null , "-max_ {$ column }" );
110
82
$ method = 'max ' ;
@@ -114,10 +86,6 @@ public function max($column)
114
86
115
87
public function min ($ column )
116
88
{
117
- if (! $ this ->isCachable ) {
118
- return parent ::min ($ column );
119
- }
120
-
121
89
$ arguments = func_get_args ();
122
90
$ cacheKey = $ this ->makeCacheKey (['* ' ], null , "-min_ {$ column }" );
123
91
$ method = 'min ' ;
@@ -127,10 +95,6 @@ public function min($column)
127
95
128
96
public function pluck ($ column , $ key = null )
129
97
{
130
- if (! $ this ->isCachable ) {
131
- return parent ::pluck ($ column , $ key );
132
- }
133
-
134
98
$ keyDifferentiator = "-pluck_ {$ column }" . ($ key ? "_ {$ key }" : "" );
135
99
$ arguments = func_get_args ();
136
100
$ cacheKey = $ this ->makeCacheKey ([$ column ], null , $ keyDifferentiator );
@@ -141,10 +105,6 @@ public function pluck($column, $key = null)
141
105
142
106
public function sum ($ column )
143
107
{
144
- if (! $ this ->isCachable ) {
145
- return parent ::sum ($ column );
146
- }
147
-
148
108
$ arguments = func_get_args ();
149
109
$ cacheKey = $ this ->makeCacheKey (['* ' ], null , "-sum_ {$ column }" );
150
110
$ method = 'sum ' ;
@@ -154,10 +114,6 @@ public function sum($column)
154
114
155
115
public function value ($ column )
156
116
{
157
- if (! $ this ->isCachable ) {
158
- return parent ::value ($ column );
159
- }
160
-
161
117
$ arguments = func_get_args ();
162
118
$ cacheKey = $ this ->makeCacheKey (['* ' ], null , "-value_ {$ column }" );
163
119
$ method = 'value ' ;
0 commit comments