@@ -9,23 +9,23 @@ class CachedBuilder extends EloquentBuilder
9
9
10
10
public function avg ($ column )
11
11
{
12
- return $ this ->cache ($ this ->makeCacheTags ($ this ))
12
+ return $ this ->cache ($ this ->makeCacheTags ())
13
13
->rememberForever ($ this ->makeCacheKey () . "-avg_ {$ column }" , function () use ($ column ) {
14
14
return parent ::avg ($ column );
15
15
});
16
16
}
17
17
18
18
public function count ($ columns = ['* ' ])
19
19
{
20
- return $ this ->cache ($ this ->makeCacheTags ($ this ))
20
+ return $ this ->cache ($ this ->makeCacheTags ())
21
21
->rememberForever ($ this ->makeCacheKey () . "-count " , function () use ($ columns ) {
22
22
return parent ::count ($ columns );
23
23
});
24
24
}
25
25
26
26
public function cursor ()
27
27
{
28
- return $ this ->cache ($ this ->makeCacheTags ($ this ))
28
+ return $ this ->cache ($ this ->makeCacheTags ())
29
29
->rememberForever ($ this ->makeCacheKey () . "-cursor " , function () {
30
30
return collect (parent ::cursor ());
31
31
});
@@ -36,39 +36,39 @@ public function cursor()
36
36
*/
37
37
public function find ($ id , $ columns = ['* ' ])
38
38
{
39
- return $ this ->cache ($ this ->makeCacheTags ($ this ))
39
+ return $ this ->cache ($ this ->makeCacheTags ())
40
40
->rememberForever ($ this ->makeCacheKey ($ columns , $ id ), function () use ($ id , $ columns ) {
41
41
return parent ::find ($ id , $ columns );
42
42
});
43
43
}
44
44
45
45
public function first ($ columns = ['* ' ])
46
46
{
47
- return $ this ->cache ($ this ->makeCacheTags ($ this ))
47
+ return $ this ->cache ($ this ->makeCacheTags ())
48
48
->rememberForever ($ this ->makeCacheKey ($ columns ) . '-first ' , function () use ($ columns ) {
49
49
return parent ::first ($ columns );
50
50
});
51
51
}
52
52
53
53
public function get ($ columns = ['* ' ])
54
54
{
55
- return $ this ->cache ($ this ->makeCacheTags ($ this ))
55
+ return $ this ->cache ($ this ->makeCacheTags ())
56
56
->rememberForever ($ this ->makeCacheKey ($ columns ), function () use ($ columns ) {
57
57
return parent ::get ($ columns );
58
58
});
59
59
}
60
60
61
61
public function max ($ column )
62
62
{
63
- return $ this ->cache ($ this ->makeCacheTags ($ this ))
63
+ return $ this ->cache ($ this ->makeCacheTags ())
64
64
->rememberForever ($ this ->makeCacheKey () . "-max_ {$ column }" , function () use ($ column ) {
65
65
return parent ::max ($ column );
66
66
});
67
67
}
68
68
69
69
public function min ($ column )
70
70
{
71
- return $ this ->cache ($ this ->makeCacheTags ($ this ))
71
+ return $ this ->cache ($ this ->makeCacheTags ())
72
72
->rememberForever ($ this ->makeCacheKey () . "-min_ {$ column }" , function () use ($ column ) {
73
73
return parent ::min ($ column );
74
74
});
@@ -82,15 +82,15 @@ public function pluck($column, $key = null)
82
82
$ cacheKey .= "_ {$ key }" ;
83
83
}
84
84
85
- return $ this ->cache ($ this ->makeCacheTags ($ this ))
85
+ return $ this ->cache ($ this ->makeCacheTags ())
86
86
->rememberForever ($ cacheKey , function () use ($ column , $ key ) {
87
87
return parent ::pluck ($ column , $ key );
88
88
});
89
89
}
90
90
91
91
public function sum ($ column )
92
92
{
93
- return $ this ->cache ($ this ->makeCacheTags ($ this ))
93
+ return $ this ->cache ($ this ->makeCacheTags ())
94
94
->rememberForever ($ this ->makeCacheKey () . "-sum_ {$ column }" , function () use ($ column ) {
95
95
return parent ::sum ($ column );
96
96
});
0 commit comments