PHP Class 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.
Afficher le fichier
Open project: pradosoft/prado
Class Usage Examples
Méthodes publiques
Méthodes protégées
Method Details
_destroy()
public méthode
This method should be overriden if {@link setUseCustomStorage UseCustomStorage} is set true.
calculateKey()
protected méthode
getCache()
public méthode
public getCache ( ) : Prado\Caching\ICache |
Résultat |
Prado\Caching\ICache |
the cache module being used for data storage |
getCacheModuleID()
public méthode
getKeyPrefix()
public méthode
public getKeyPrefix ( ) : string |
Résultat |
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()
public méthode
setKeyPrefix()
public méthode