session_cache_limiter
Description
The session_cache_limiter of Session for PHP gets and/or sets the current cache limiter.
Syntax
session_cache_limiter( ?string $value = null ): string|false
Parameters
value
If value is specified and not null, the name of the current cache limiter is changed to the new value.
Value | Headers |
---|---|
public | Expires: (sometime in the future, according session.cache_expire) Cache-Control: public, max-age=(sometime in the future, according to session.cache_expire) Last-Modified: (the timestamp of when the session was last saved) |
private_no_expire | Cache-Control: private, max-age=(session.cache_expire in the future), pre-check=(session.cache_expire in the future) Last-Modified: (the timestamp of when the session was last saved) |
private | Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: private, max-age=(session.cache_expire in the future), pre-check=(session.cache_expire in the future) Last-Modified: (the timestamp of when the session was last saved) |
nocache | Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache |
Return
Returns the name of the current cache limiter. On failure to change the value, false is returned.
Examples
1 · void
<? $return = session_cache_limiter(); echo $return;
nocache
2 · value · previous
<? $value = "private"; $return = session_cache_limiter($value); echo $return;
nocache
3 · value · current
<? $value = "private"; session_cache_limiter($value); $return = session_cache_limiter(); echo $return;
private
Links
Related
Session
- session_abort
- session_cache_expire
- session_commit
- session_create_id
- session_decode
- session_destroy
- session_encode
- session_gc
- session_get_cookie_params
- session_id
- session_module_name
- session_name
- session_regenerate_id
- session_register_shutdown
- session_reset
- session_save_path
- session_set_cookie_params
- session_set_save_handler
- session_start
- session_status
- session_unset
- session_write_close