The php Function Session Cache Limiter
The php function session_cache_limiter allows you to set the maximum number of cached pages that are sent to a client. It is very important if you have multiple servers or if your site uses a content management system like Codeigniter or Mojomotor. The default setting is 2 but depending on your server configuration this may not be enough. If your web application relies on a third party session library then you should look at that documentation for additional settings.
Session support in php allows you to preserve data across requests by assigning each request a unique id, the so-called session id, which is either stored in a cookie on the client side or passed in a URL as a parameter. The latter method is the most secure and also allows you to link to pages within your site using a standard format like SID=
However, it is common for some third party applications to send stale pages to users if they don't add one of the HTTP Cache-Control or Last-Modified headers. This is due to caching mechanisms in browsers which may not update the data if it is already present in the cookie.
In order to avoid these problems the session module provides the option to set a cache limiter which determines the maximum number of cached pages that will be sent to clients. The default value is 'nocache' and can be overridden at request startup time by calling session_cache_limiter(). Other settings which can be configured include the following: