All Data Structures Functions Variables Pages
Static Public Member Functions | Data Fields | Static Public Attributes | Static Protected Member Functions
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 ()
 
- Static Public Member Functions inherited from ZurmoCache
static getCachePrefix ($identifier)
 
static setAdditionalStringForCachePrefix ($prefix= '')
 
static getAdditionalStringForCachePrefix ()
 
static supportsAndAllowsMemcache ()
 
static supportsAndAllowsPhpCaching ()
 
static supportsAndAllowsDatabaseCaching ()
 

Data Fields

const READ = 'R'
 
const CHANGE = 'C'
 
- Data Fields inherited from ZurmoCache
const ALLOW_PHP_CACHING = true
 
const ALLOW_MEMCACHE_CACHING = true
 
const ALLOW_DB_CACHING = true
 
const CACHE_VALUE_KEY = 'value'
 
const CACHE_CHECKSUM_KEY = 'checksum'
 

Static Public Attributes

static $mungeIdsCachePrefix = 'MI:'
 
static $cacheType = 'APO:'
 
- Static Public Attributes inherited from ZurmoCache
static $cacheType = 'Z:'
 

Static Protected Member Functions

static resolveToSetFlashMessageOnForgetAll ()
 
- Static Protected Member Functions inherited from ZurmoCache
static getCacheIncrementValue ($cacheType)
 
static setCacheIncrementValue ($cacheType, $value)
 
static incrementCacheIncrementValue ($cacheType)
 
static isIdentifierCacheIncrementValueName ($identifier)
 
static clearMemcacheCache ()
 
static cacheValueAndChecksum ($key, $value)
 
static getCachedValueAndValidateChecksum ($key)
 

Additional Inherited Members

- Static Protected Attributes inherited from ZurmoCache
static $cacheIncrementValueVariableName = 'CacheIncrementValue'
 
static $additionalStringForCachePrefix = ''
 

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 ( )
staticprotected

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:
Generated on Sat Apr 4 2020 07:10:48