Why use session_cache_limiter () [closed]

-4

Should I use session_cache_limiter () ?? Why?

Values: nocache, private, private_no_expire or public.

    
asked by anonymous 16.12.2015 / 06:17

1 answer

1

"Cache" is a way of storing a value for a faster, future query. With the cache we were able to optimize the loading of the sites and their information.

Suppose you have a site that queries a database table that has 3,000,000 records, and this query takes more than 30 seconds (believe me, this happens). With the cache you can reduce that time in a few seconds, relative to user or not, it depends on how you want your system to behave.

Caching an information means saving it somewhere (either in a file or directly in the server's RAM) so that you can consult that information without having to get it in the most time-consuming way (in the example above, with the query the database).

When you determine a cache type for the system means that;

  • nochace: would reject any caching of the client.
  • private: a little more restrictive than public.
  • private_no_expire: Expired header is never sent to the client in this mode.
  • public: would allow caching

You can see more details and examples in the PHP documentation

Source: Thiago belem

    
16.12.2015 / 11:24