protected static function storeCacheKey(string $modelName, string $cacheKey): void
    {
        $keysFile = storage_path('framework/cache/data/rinvex.cacheable.json');
        $cacheKeys = static::getCacheKeys($keysFile);

        if (! isset($cacheKeys[$modelName]) || ! in_array($cacheKey, $cacheKeys[$modelName])) {
            $cacheKeys[$modelName][] = $cacheKey;
            file_put_contents($keysFile, json_encode($cacheKeys));
        }
    }
protected static function storeCacheKey(string $modelName, string $cacheKey): void
    {
        $keysFile = storage_path('framework/cache/data/rinvex.cacheable.json');
        $cacheKeys = static::getCacheKeys($keysFile);

        if (! isset($cacheKeys[$modelName]) || ! in_array($cacheKey, $cacheKeys[$modelName])) {
            $cacheKeys[$modelName][] = $cacheKey;
            file_put_contents($keysFile, json_encode($cacheKeys));
        }
    }
protected static function storeCacheKey ( string $ modelName , string $ cacheKey ) : void { $ keysFile = storage_path ( 'framework/cache/data/rinvex.cacheable.json' ) ; $ cacheKeys = static :: getCacheKeys ( $ keysFile ) ; if ( ! isset ( $ cacheKeys [ $ modelName ] ) || ! in_array ( $ cacheKey , $ cacheKeys [ $ modelName ] ) ) { $ cacheKeys [ $ modelName ] [ ] = $ cacheKey ; file_put_contents ( $ keysFile , json_encode ( $ cacheKeys ) ) ; } }
Store the given cache key for the given model by mimicking cache tags.

@param string $modelName
@param string $cacheKey

@return void
Store the given cache key for the given model by mimicking cache tags .