You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/infrastructure_and_maintenance/cache/http_cache/content_aware_cache.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -424,7 +424,7 @@ Next, use nslookup to find the IP:
424
424
### Fetching user context hash
425
425
426
426
As explained in [User Context Hash caching](context_aware_cache.md#user-context-hash-caching), the HTTP cache indexes the cache based on the user-context-hash.
427
-
Users with the same user-context-hash here the same cache (as long as [[= product_name =]] responds with `Vary: X-Context-User-Hash`).
427
+
Users with the same user-context-hash share the same cache (as long as [[= product_name =]] responds with `Vary: X-User-Context-Hash`).
428
428
429
429
To simulate the requests the HTTP cache sends to [[= product_name =]], you need this user-context-hash.
Copy file name to clipboardExpand all lines: docs/infrastructure_and_maintenance/cache/http_cache/context_aware_cache.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ This is called (user) context-aware cache.
10
10
It means that HTTP cache is unique per set of user permissions (roles and limitations), and there are variations of cache shared only among users that have the exact same permissions.
11
11
So if a user browses a list of children locations, they only see children locations they have access to, even if their rendering is served from HTTP cache.
12
12
13
-
This is accomplished by varying on a header called `X-Context-User-Hash`, which the system populates on the request.
13
+
This is accomplished by varying on a header called `X-User-Context-Hash`, which the system populates on the request.
14
14
The [logic for this](#request-lifecycle) is accomplished in the provided VCL for Varnish and Fastly.
15
15
A similar but internal logic is done in the provided enhanced Symfony Proxy (AppCache).
16
16
@@ -21,9 +21,9 @@ This expands steps covered in [FOSHttpCacheBundle documentation on user context
21
21
1. A client (browser) requests URI `/foo`.
22
22
1. The caching proxy receives the request and holds it. It first sends a hash request to the application's context hash route: `/_fos_user_context_hash`.
23
23
1. The application receives the hash request. An event subscriber (`UserContextSubscriber`) aborts the request immediately after the Symfony firewall is applied.
24
-
The application calculates the hash (`HashGenerator`) and then sends a response with the hash in a custom header (`X-Context-User-Hash`).
24
+
The application calculates the hash (`HashGenerator`) and then sends a response with the hash in a custom header (`X-User-Context-Hash`).
25
25
1. The caching proxy receives the hash response, copies the hash header to the client's original request for `/foo` and restarts the modified original request.
26
-
1. If the response to `/foo` should differ per user context, the application sets a `Vary: X-Context-User-Hash` header, which makes Proxy store the variations of this cache varying on the hash value.
26
+
1. If the response to `/foo` should differ per user context, the application sets a `Vary: X-User-Context-Hash` header, which makes Proxy store the variations of this cache varying on the hash value.
27
27
28
28
The next time a request comes in from the same user, application lookup for the hash (step 3) doesn't take place, as the hash lookup itself is cached by the cache proxy as described below.
29
29
@@ -33,7 +33,7 @@ Example of a response sent to reverse proxy from `/_fos_user_context_hash` with
0 commit comments