![]() Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : fdshops ( 1003) PHP Version : 8.2.21 Disable Function : NONE Directory : /home/fdshops/public_html/vendor/laravel/framework/src/Illuminate/Cache/Console/ |
<?php namespace Illuminate\Cache\Console; use Illuminate\Cache\CacheManager; use Illuminate\Console\Command; use Symfony\Component\Console\Attribute\AsCommand; #[AsCommand(name: 'cache:forget')] class ForgetCommand extends Command { /** * The console command name. * * @var string */ protected $signature = 'cache:forget {key : The key to remove} {store? : The store to remove the key from}'; /** * The name of the console command. * * This name is used to identify the command during lazy loading. * * @var string|null * * @deprecated */ protected static $defaultName = 'cache:forget'; /** * The console command description. * * @var string */ protected $description = 'Remove an item from the cache'; /** * The cache manager instance. * * @var \Illuminate\Cache\CacheManager */ protected $cache; /** * Create a new cache clear command instance. * * @param \Illuminate\Cache\CacheManager $cache * @return void */ public function __construct(CacheManager $cache) { parent::__construct(); $this->cache = $cache; } /** * Execute the console command. * * @return void */ public function handle() { $this->cache->store($this->argument('store'))->forget( $this->argument('key') ); $this->components->info('The ['.$this->argument('key').'] key has been removed from the cache.'); } }