PHP 클래스 Prado\Web\TCacheHttpSession
TCacheHttpSession provides access for storing session data using a cache module (e.g. TMemCache, TDbCache).
To specify the cache module for data storage, set the {@link setCacheModuleID CacheModuleID} property
which should refer to a valid cache module configured in the application configuration.
The following example shows how we configure TCacheHttpSession:
Beware, by definition cache storage are volatile, which means the data stored on them
may be swapped out and get lost. This may not be the case for certain cache storage,
such as database. So make sure you manage your cache properly to avoid loss of session data.
파일 보기
프로젝트 열기: pradosoft/prado
1 사용 예제들
공개 메소드들
보호된 메소드들
메소드 상세
This method should be overriden if {@link setUseCustomStorage UseCustomStorage} is set true.
public getCache ( ) : Prado\Caching\ICache |
리턴 |
Prado\Caching\ICache |
the cache module being used for data storage |
getCacheModuleID()
공개 메소드
public getKeyPrefix ( ) : string |
리턴 |
string |
prefix of session variable name to avoid conflict with other cache data. Defaults to 'session'. |
This method is required by IModule.
It reads the CacheModule property.
setCacheModuleID()
공개 메소드