Closed (won't fix)
Project:
Authenticated User Page Caching (Authcache)
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Feb 2016 at 18:31 UTC
Updated:
12 Nov 2017 at 12:23 UTC
Jump to comment: Most recent
Comments
Comment #2
znerol commentedRegrettably it is not safe to invoke any custom hooks before Drupal is bootstrapped fully. I also do not know a way to cleanly extend the list of hard-coded bootstrap_hooks which are safe to be called early.
Instead of altering the
$_SERVER['REQUEST_URI']one might want to rewrite the request URL directly in the webserver, the reverse proxy or via .htaccess. This is also inline with common Varnish configurations where you just remove any frontend-only cookies.Comment #3
sutharsan commentedAh, I did not think about the bootstrap phase, of course.
Another possibility: a variable defined callback. Just like
authcache_backend_anonymous_key()uses.Or what about an OO approach by converting the backend to a class and using a variable to provide the name of the backend class. Then modifying the request uri provider is a matter of extending the class and overriding a method. Like a service override in D8. (not too seriously, I know this won't happen)
Comment #4
znerol commentedThis is a very slippery slope. It is one thing to allow altering the request path and parameters. But it is a completely different thing to allow site builders to alter the cid in any random way. During the development of Drupal 8 some very hard to resolve issues were introduced because core contributors ignored page caching when adding new features (e.g., #2364011: [meta] External caches mix up response formats on URLs where content negotiation is in use).
I do not intend to add such a dangerous feature unless there is a major benefit for many authcache users.
Comment #5
znerol commentedClosing this. Please reopen if anyone has a workable and safe solution to this.