Why use session_cache_limiter()

Asked

Viewed 636 times

-4

I should use session_cache_limiter() ?? why ??

Values: nocache, private, private_no_expire or public.

  • Can you give context to the question? It’s just that you don’t understand in what context you want to use it.

1 answer

1


"Cache" is a way to store a value for a faster future query. With the cache we can optimize the loading of the websites and their information.

Suppose you have a website that queries in 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 this time in a few seconds, relative to user or not it depends on how you want your system to behave.

Caching information means saving it somewhere (either in a file or directly in the server’s RAM memory) and then being able to query this information without having to obtain it in the longest way (in the example above, with the database query).

When Voce determines a type of cache for the system it means that;

  • nochace: would reject any storage in the client’s cache.
  • 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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.