1
<?php
2

3
namespace Nuwave\Lighthouse\Console;
4

5
use Illuminate\Console\Command;
6
use Illuminate\Contracts\Cache\Repository as CacheRepository;
7
use Illuminate\Contracts\Config\Repository as ConfigRepository;
8

9
class ClearCacheCommand extends Command
10
{
11
    protected $name = 'lighthouse:clear-cache';
12

13
    protected $description = 'Clear the GraphQL schema cache.';
14

15 0
    public function handle(CacheRepository $cache, ConfigRepository $config): void
16
    {
17 0
        $cache->forget(
18 0
            $config->get('lighthouse.cache.key')
19
        );
20

21 0
        $this->info('GraphQL AST schema cache deleted.');
22
    }
23
}

Read our documentation on viewing source code .

Loading