Forum Moderators: coopster

Message Too Old, No Replies

session.cache_expire

in php.ini

         

yomanfu

10:00 pm on Feb 8, 2005 (gmt 0)

10+ Year Member



May someone explain what session.cache_expire is for?

I guess it's related to session management but I don't really see how. Which "cache" is it about?

Thanks for the help!

jatar_k

7:36 pm on Feb 9, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld yomanfu,

the description of all php.ini values can be found on this page
[php.net...]

yomanfu

9:05 pm on Feb 9, 2005 (gmt 0)

10+ Year Member



Thanks for the reply and the welcome!

I always read the php manual before asking questions... But it's unclear about session.cache_expire.

For my sessions management I currently use:
session.cookie_lifetime = 0
session.gc_maxlifetime = 7200

And it doest the work.
But I'd like to understand session.cache_expire!

jatar_k

11:13 pm on Feb 9, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



to be honest I have never changed it and have never really played around with it. In some of my authentication I had trouble getting sessions to expire properly.

I have since added all expiration to my auth script. It sets a timestamp in the session and destroys the session if the difference between the stored timestamp and now is greater than 300 seconds. This method works flawlessly.

hakre

5:23 pm on Feb 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



this setting is bound to "session.cache_limiter". these both control what kind of cache control the document (http) should have. per default it's "nocache". while using "nocache" as session.cache_limiter value, session.cache_expire has no effect.

if you're using the default settings you don't have to care about.

as written, this is an http issue. the setting should control what kind of headers are send to the client and possible proxies, because they handle caching of the document. but they only do if the cache control method is not "nocache" (as php setting, http header values differ here).

docs: http 1.1 header fields definition: cache-control [w3.org]

yomanfu

6:08 pm on Feb 10, 2005 (gmt 0)

10+ Year Member



Thanks hakre!