protected static function flushCacheKeys(string $modelName): array
    {
        $flushedKeys = [];
        $keysFile = storage_path('framework/cache/data/rinvex.cacheable.json');
        $cacheKeys = static::getCacheKeys($keysFile);

        if (isset($cacheKeys[$modelName])) {
            $flushedKeys = $cacheKeys[$modelName];

            unset($cacheKeys[$modelName]);

            file_put_contents($keysFile, json_encode($cacheKeys));
        }

        return $flushedKeys;
    }
protected static function flushCacheKeys(string $modelName): array
    {
        $flushedKeys = [];
        $keysFile = storage_path('framework/cache/data/rinvex.cacheable.json');
        $cacheKeys = static::getCacheKeys($keysFile);

        if (isset($cacheKeys[$modelName])) {
            $flushedKeys = $cacheKeys[$modelName];

            unset($cacheKeys[$modelName]);

            file_put_contents($keysFile, json_encode($cacheKeys));
        }

        return $flushedKeys;
    }
protected static function flushCacheKeys ( string $ modelName ) : array { $ flushedKeys = [ ] ; $ keysFile = storage_path ( 'framework/cache/data/rinvex.cacheable.json' ) ; $ cacheKeys = static :: getCacheKeys ( $ keysFile ) ; if ( isset ( $ cacheKeys [ $ modelName ] ) ) { $ flushedKeys = $ cacheKeys [ $ modelName ] ; unset ( $ cacheKeys [ $ modelName ] ) ; file_put_contents ( $ keysFile , json_encode ( $ cacheKeys ) ) ; } return $ flushedKeys ; }
Flush cache keys of the given model by mimicking cache tags.

@param string $modelName

@return array
Flush cache keys of the given model by mimicking cache tags .