session_cache_limiter
Get and/or set the current cache limiter
Function name: session_cache_limiter()
Function description: The session_cache_limiter() function is used to obtain or set the cache limiter for the current session.
usage:
Get the cache limiter for the current session: string session_cache_limiter ( void )
Set the cache limiter for the current session: bool session_cache_limiter ( string $cache_limiter )
parameter:
Return value:
Example:
Get the cache limiter for the current session:
$cache_limiter = session_cache_limiter(); echo "当前会话的缓存限制器为:".$cache_limiter;
Output:
当前会话的缓存限制器为:nocache
Set the cache limiter for the current session to 'private':
$result = session_cache_limiter('private'); if ($result) { echo "设置缓存限制器成功!"; } else { echo "设置缓存限制器失败!"; }
Output:
设置缓存限制器成功!
Notes: