src/LaravelStrapiRequest.php
/*
     * Remember all cache keys to flush strapi cache only
     * 
     */
Remember all cache keys to flush strapi cache only
Remember all cache keys to flush strapi cache only
public function rememberCacheKeys($cacheKey)
    {
        if(Cache::has(config('strapi.cache_prefix').'.keys')){
            $cached_keys = Cache::get(config('strapi.cache_prefix').'.keys');
            if(!in_array($cacheKey, $cached_keys)){
                $cached_keys[] = $cacheKey;
            }
            Cache::put(config('strapi.cache_prefix').'.keys', $cached_keys);
        }else{
            Cache::put(config('strapi.cache_prefix').'.keys', [$cacheKey]);
        }
    }
public function rememberCacheKeys ( $ cacheKey ) { if ( Cache :: has ( config ( 'strapi.cache_prefix' ) . '.keys' ) ) { $ cached_keys = Cache :: get ( config ( 'strapi.cache_prefix' ) . '.keys' ) ; if ( ! in_array ( $ cacheKey , $ cached_keys ) ) { $ cached_keys [ ] = $ cacheKey ; } Cache :: put ( config ( 'strapi.cache_prefix' ) . '.keys' , $ cached_keys ) ; } else { Cache :: put ( config ( 'strapi.cache_prefix' ) . '.keys' , [ $ cacheKey ] ) ; } }
Remember all cache keys to flush strapi cache only
Remember all cache keys to flush strapi cache only