AllPermissionsOptimizationCache Class Reference

Inheritance diagram for AllPermissionsOptimizationCache:
ZurmoCache

Static Public Member Functions

static getHasReadPermissionOnSecurableItem (SecurableItem $securableItem, Permitable $permitable)
static cacheHasReadPermissionOnSecurableItem (SecurableItem $securableItem, Permitable $permitable, $hasReadPermission)
static getMungeIdsByUser (User $user)
static cacheMungeIdsByUser (User $user, array $mungeIds)
static forgetSecurableItemForRead (SecurableItem $securableItem)
static forgetSecurableItemForChange (SecurableItem $securableItem)
static forgetAll ()

Data Fields

const READ = 'R'
const CHANGE = 'C'

Static Public Attributes

static $mungeIdsCachePrefix = 'MI:'
static $cacheType = 'APO:'

Static Protected Member Functions

static resolveToSetFlashMessageOnForgetAll ()

Detailed Description

Class AllPermissionsOptimizationCache This is so that accessing the checkPermissionsHasAnyOf( of a securable item several times, specifically setting several of its attributes in succession, will not recalculate the user's permissions every time. Changes to permissions during a request may be ignored, then will be picked up during the next request. Permissions optimizations are cached at two levels, in php - they will be remembered during the request and in memcache - they will be remembered across requests, in the database - they will be remembered across requests even if memcache doesn't have them.

Definition at line 48 of file AllPermissionsOptimizationCache.php.


Member Function Documentation

static getHasReadPermissionOnSecurableItem ( SecurableItem securableItem,
Permitable permitable 
) [static]
Parameters:
SecurableItem $securableItem
Permitable $permitable
Returns:
mixed | boolean
Exceptions:
NotFoundException 

Definition at line 90 of file AllPermissionsOptimizationCache.php.

static cacheHasReadPermissionOnSecurableItem ( SecurableItem securableItem,
Permitable permitable,
hasReadPermission 
) [static]
Parameters:
SecurableItem $securableItem
Permitable $permitable
boolean $hasReadPermission

Definition at line 141 of file AllPermissionsOptimizationCache.php.

static getMungeIdsByUser ( User user  )  [static]
Parameters:
User $user
Returns:
mixed | array $mungeIds
Exceptions:
NotFoundException 

Definition at line 185 of file AllPermissionsOptimizationCache.php.

static cacheMungeIdsByUser ( User user,
array $  mungeIds 
) [static]
Parameters:
User $user
array $mungeIds

Definition at line 215 of file AllPermissionsOptimizationCache.php.

static forgetSecurableItemForRead ( SecurableItem securableItem  )  [static]
Parameters:
SecurableItem $securableItem

Definition at line 237 of file AllPermissionsOptimizationCache.php.

static forgetSecurableItemForChange ( SecurableItem securableItem  )  [static]
Parameters:
SecurableItem $securableItem

Definition at line 259 of file AllPermissionsOptimizationCache.php.

static resolveToSetFlashMessageOnForgetAll (  )  [static, protected]

In larger deployments the showFlashMessageWhenSecurityCacheShouldBeRebuilt should be set to true since when clearing cache, it would require a rebuild to ensure future requests are fast. Matters the most when nested roles/groups are used.

Definition at line 298 of file AllPermissionsOptimizationCache.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Tue Jul 23 07:10:54 2019