]> _ Git - psq.git/commitdiff
add cache to metrics
authorLouis Jeckel <louis.jeckel@outlook.cm>
Thu, 27 Aug 2020 10:38:24 +0000 (12:38 +0200)
committerLouis Jeckel <louis.jeckel@outlook.cm>
Thu, 27 Aug 2020 10:38:24 +0000 (12:38 +0200)
app/Http/Controllers/Controller.php
app/Nova/Metrics/FileAccess.php
app/Nova/Metrics/MailEvents.php
app/Nova/Metrics/MailEventsPartition.php
app/Nova/Metrics/TotalUsers.php
app/Nova/Metrics/UsersPartition.php

index 849a76d1114d1159c023a9dde68eeebaa63507d1..8eb0a7d83dbb4ac5a728fe03645a7a0627d9d2c9 100644 (file)
@@ -13,7 +13,7 @@ class Controller extends BaseController
 
     public function __construct()
     {
-        if(config('app.env') === 'prod') {
+        if(config('app.env') === 'production') {
             $this->middleware('auth');
             $this->middleware('early');
 
index 8486a40c217a11b22e1b7ce2995d2cb961818412..06e9a73ca16f4de1e01f81be30837583988d7b74 100644 (file)
@@ -48,7 +48,7 @@ class FileAccess extends Value
      */
     public function cacheFor()
     {
-        // return now()->addMinutes(5);
+         return now()->addMinutes(5);
     }
 
     /**
index f6559365d0a6772a1224a7a958970413b77d2cc3..30eadcaf31b2ec40a1b16d5625068da7f5f71e25 100644 (file)
@@ -63,7 +63,7 @@ class MailEvents extends Value
      */
     public function cacheFor()
     {
-        // return now()->addMinutes(5);
+         return now()->addMinutes(5);
     }
 
     /**
index 482b2386f2824c767fadac5444ed4cb13e298c8a..ca5dbd8503ac6d20ae9f96dd3fa714a93c5eae5d 100644 (file)
@@ -26,7 +26,7 @@ class MailEventsPartition extends Partition
      */
     public function cacheFor()
     {
-        // return now()->addMinutes(5);
+         return now()->addMinutes(5);
     }
 
     /**
index 7b781c7b906a7eb581703e424ef5a2608ff4b518..6ba37f945d9ad79965513dd81767ddd73ffdaa77 100644 (file)
@@ -29,7 +29,7 @@ class TotalUsers extends Value
      */
     public function cacheFor()
     {
-//         return now()->addMinutes(5);
+         return now()->addMinutes(5);
     }
 
     /**
index 31842014e6c0b0f5285599dba674df7578f9497b..52c446731f27c75f822bec1d2d055b372180e99f 100644 (file)
@@ -34,7 +34,7 @@ class UsersPartition extends Partition
      */
     public function cacheFor()
     {
-        // return now()->addMinutes(5);
+         return now()->addMinutes(5);
     }
 
     /**