File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 3
3
namespace Illuminate \Cache ;
4
4
5
5
use Illuminate \Support \LazyCollection ;
6
+ use Illuminate \Support \Carbon ;
6
7
7
8
class RedisTagSet extends TagSet
8
9
{
@@ -16,7 +17,7 @@ class RedisTagSet extends TagSet
16
17
*/
17
18
public function addEntry (string $ key , int $ ttl = 0 , $ updateWhen = null )
18
19
{
19
- $ ttl = $ ttl > 0 ? now ()->addSeconds ($ ttl )->getTimestamp () : -1 ;
20
+ $ ttl = $ ttl > 0 ? Carbon:: now ()->addSeconds ($ ttl )->getTimestamp () : -1 ;
20
21
21
22
foreach ($ this ->tagIds () as $ tagKey ) {
22
23
if ($ updateWhen ) {
@@ -72,7 +73,7 @@ public function flushStaleEntries()
72
73
{
73
74
$ this ->store ->connection ()->pipeline (function ($ pipe ) {
74
75
foreach ($ this ->tagIds () as $ tagKey ) {
75
- $ pipe ->zremrangebyscore ($ this ->store ->getPrefix ().$ tagKey , 0 , now ()->getTimestamp ());
76
+ $ pipe ->zremrangebyscore ($ this ->store ->getPrefix ().$ tagKey , 0 , Carbon:: now ()->getTimestamp ());
76
77
}
77
78
});
78
79
}
You can’t perform that action at this time.
0 commit comments