Backend\Modules\Search\Engine\Model::invalidateCache PHP Method

invalidateCache() public static method

Invalidate search cache
public static invalidateCache ( )
    public static function invalidateCache()
    {
        $finder = new Finder();
        $filesystem = new Filesystem();
        foreach ($finder->files()->in(FRONTEND_CACHE_PATH . '/Search/') as $file) {
            $filesystem->remove($file->getRealPath());
        }
        // clear the php5.5+ opcode cache
        if (function_exists('opcache_reset')) {
            opcache_reset();
        }
    }