Jump to content
php.lv forumi

nestrada session_cache_expire


mors

Recommended Posts

sava lapa izmantoju sesijas un viss strada, vienigi kaut kas nav ar expire time, defaulta tas ir 180 minutes, bet man ta sesija pat stundu neturas. meginaju ar session_cache_expire(1); uzstadit laiku uz minuti, lai patestetu vai shi funkcija maz strada, bet tapat sesija, ja vien pats to nenobeidz, ir aktiva apm. 20-40min., bet nevis uzstadito 1 min vai defaultas 3 stundas. ka lai es nosaku to expire laiku un kapec sesija neturas tas 180min.?

Link to comment
Share on other sites

Svariigi ir kaads ir iestaadiits session.cache_limiter ja tas nav mainiits un ir 'nocache' ..

 

Proti ja ir defaultais 'nocache' tad nav noziimes darboties "Setting new_cache_expire is of value only, if session.cache_limiter is set to a value different from nocache. "

 

Liidz ar to samaini konfiguraacijaa uz 'private' vai 'private_no_expire' vai ja nepieciesshams tikai dazhaam lapaam lieto shaadi:

 

 

session_cache_limiter('private');
session_cache_expire(180);

session_start();

 

 

Par limiter veertiibaam:

 

The cache limiter defines which cache control HTTP headers are sent to the client. These headers determine the rules by which the page content may be cached by the client and intermediate proxies. Setting the cache limiter to nocache disallows any client/proxy caching. A value of public permits caching by proxies and the client, whereas private disallows caching by proxies and permits the client to cache the contents.

 

In private mode, the Expire header sent to the client may cause confusion for some browsers, including Mozilla. You can avoid this problem by using private_no_expire mode. The expire header is never sent to the client in this mode.

Link to comment
Share on other sites

×
×
  • Create New...