| | |
| | | ]; |
| | | |
| | | // Check cache |
| | | $key = $this->cache->generateKey($args); |
| | | if ($cached = $this->cache->get($key)) { |
| | | |
| | | if ($cached = $this->cache->get($args)) { |
| | | return $this->success($cached); |
| | | } |
| | | |
| | |
| | | : $this->getUserInvitations($args); |
| | | |
| | | // Cache result |
| | | $this->cache->set($key, $result); |
| | | $this->cache->set($args, $result); |
| | | |
| | | return $this->success($result); |
| | | } |
| | |
| | | /** |
| | | * Get invitations for a specific term |
| | | */ |
| | | protected function getTermInvitations(array $args): array |
| | | public function getTermInvitations(array $args): array |
| | | { |
| | | // Check permission |
| | | if (!Roles::getInstance()()->isManager($args['user'], $args['to_term'])) { |