app/maguttiCms/Permission/GFEntrustUserTrait.php
//Big block of caching functionality.
Big block of caching functionality.
Big block of caching functionality .
public function cachedRoles()
    {
        $userPrimaryKey = $this->primaryKey;
        $cacheKey = 'entrust_roles_for_'.$this->getTable().'_'.$this->$userPrimaryKey;
        return Cache::tags($this->role_user_table)->remember($cacheKey, Config::get('cache.entrust_ttl',10), function () {
            return $this->roles()->get();
        });
    }
public function cachedRoles ( ) { $ userPrimaryKey = $ this -> primaryKey ; $ cacheKey = 'entrust_roles_for_' . $ this -> getTable ( ) . '_' . $ this -> $ userPrimaryKey ; return Cache :: tags ( $ this -> role_user_table ) -> remember ( $ cacheKey , Config :: get ( 'cache.entrust_ttl' , 10 ) , function ( ) { return $ this -> roles ( ) -> get ( ) ; } ) ; }
Big block of caching functionality.
Big block of caching functionality .
// se non configurato valore della cache di 10 secondi