0
votes

Can you enable both private and public caching through the cache-control header? How would you do that?

Thanks!

1

1 Answers

1
votes

The Cache-Control: public response header enables any kind of intermediate cache. If you want the response to be cached as widely as possible, then this is what you use.

The Cache-Control: private response header disables any caching that might expose the response to any user but the current user. This will prevent caching by most proxies and intermediate servers, allowing the response to be cached only in user-specific client-side caches. Any cache that can be used with this setting can also be used with the public setting.