PHP 클래스 Elgg\Cache\EntityCache

파일 보기 프로젝트 열기: elgg/elgg 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( ElggSession $session, MetadataCache $metadata_cache ) Constructor
clear ( ) : void Clear the entity cache
disableCachingForEntity ( integer $guid ) : void Remove this entity from the entity cache and make sure it is not re-added
enableCachingForEntity ( integer $guid ) : void Allow this entity to be stored in the entity cache
get ( integer $guid ) : ElggEntity | false Retrieve a entity from the cache.
getByUsername ( string $username ) : ElggUser | false Returns cached user entity by username
remove ( integer $guid ) : void Invalidate this class's entry in the cache.
set ( ElggEntity $entity ) : void Cache an entity.

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( ElggSession $session, MetadataCache $metadata_cache )
$session ElggSession Session
$metadata_cache MetadataCache MD cache

clear() 공개 메소드

Clear the entity cache
public clear ( ) : void
리턴 void

disableCachingForEntity() 공개 메소드

Remove this entity from the entity cache and make sure it is not re-added
public disableCachingForEntity ( integer $guid ) : void
$guid integer The entity guid
리턴 void

enableCachingForEntity() 공개 메소드

Allow this entity to be stored in the entity cache
public enableCachingForEntity ( integer $guid ) : void
$guid integer The entity guid
리턴 void

get() 공개 메소드

Retrieve a entity from the cache.
public get ( integer $guid ) : ElggEntity | false
$guid integer The GUID
리턴 ElggEntity | false false if entity not cached, or not fully loaded

getByUsername() 공개 메소드

Returns cached user entity by username
public getByUsername ( string $username ) : ElggUser | false
$username string Username
리턴 ElggUser | false

remove() 공개 메소드

Invalidate this class's entry in the cache.
public remove ( integer $guid ) : void
$guid integer The entity guid
리턴 void

set() 공개 메소드

Cache an entity.
public set ( ElggEntity $entity ) : void
$entity ElggEntity Entity to cache
리턴 void