| | |
| | | $this->termCache->user(); |
| | | |
| | | |
| | | if (JVB_TESTING) { |
| | | $this->cache->flush(); |
| | | } |
| | | |
| | | add_action('init', [$this, 'registerContentExecutors'], 5); |
| | | } |
| | | |
| | |
| | | $args['s'] = sanitize_text_field($params['search']); |
| | | } |
| | | |
| | | $key = $this->cache->generateKey($args); |
| | | $cached = $this->cache->get($key); |
| | | |
| | | $cached = $this->cache->get($args); |
| | | if ($cached) { |
| | | return $cached; |
| | | } |
| | |
| | | ]; |
| | | |
| | | |
| | | $this->cache->set($key, $data); |
| | | $this->cache->set($args, $data); |
| | | |
| | | return Response::success($data); |
| | | } |
| | |
| | | $args['s'] = sanitize_text_field($params['search']); |
| | | } |
| | | |
| | | $key = $this->cache->generateKey($args); |
| | | |
| | | // Check HTTP cache headers with the specific content type |
| | | // $cache_check = $this->checkHeaders($request, $key); |
| | | // if ($cache_check) { |
| | | // return $cache_check; |
| | | // } |
| | | |
| | | $cache = $this->cache->get($key); |
| | | $cache = $this->cache->get($args); |
| | | if ($cache) { |
| | | return Response::success($cache); |
| | | } |
| | |
| | | $this->taxonomies = []; |
| | | $data['items'] =array_map([$this, 'prepareTerm'], $terms); |
| | | |
| | | $this->cache->set($key, $data); |
| | | $this->cache->set($args, $data); |
| | | |
| | | return Response::success($data); |
| | | } |