| | |
| | | public function __construct() |
| | | { |
| | | $this->cacheName = 'referrals'; |
| | | $this->cacheTtl = HOUR_IN_SECONDS; |
| | | $this->cacheTtl = (int)HOUR_IN_SECONDS; |
| | | parent::__construct(); |
| | | |
| | | $this->referrals = CustomTable::for('referrals'); |
| | |
| | | ]; |
| | | |
| | | $response = $this->success($data); |
| | | return $this->addCacheHeaders($response, $cache_key, $data); |
| | | return $this->addCacheHeaders($response); |
| | | } |
| | | |
| | | /** |
| | |
| | | $stats = JVB()->referrals()->getUserStats($user_id); |
| | | |
| | | $response = $this->success(['items' => [$stats]]); |
| | | return $this->addCacheHeaders($response, $cache_key, $stats, 5 * MINUTE_IN_SECONDS); |
| | | return $this->addCacheHeaders($response); |
| | | } |
| | | |
| | | /** |