Posted by mikeytown2 on July 8, 2009 at 11:59pm
| Project: | Boost |
| Version: | 6.x-1.x-dev |
| Component: | Caching logic |
| Category: | feature request |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Use http://api.drupal.org/api/function/custom_url_rewrite_outbound/6
If user != 0 then append nocache=1 to all internal links.
This would only be useful for sites that don't have users other then administrators/staff, since the url addition could get kinda annoying. Another option would be to turn off clean url's for logged in users so all links generated look like index.php?1=node/1 which wouldn't be in the cache.
Subdomains is kinda the standard way to do it right now.http://www.example.com - Anonymous usershttp://auth.example.com - Logged in users
Comments
#1
I think disabling clean url's would be the easiest.
inside boost_boot()/boost_init(),
$GLOBALS['conf']['clean_url'] = FALSEif & only if $user->uid != 0.#2
Just tested and kinda works except that with Image Assist image links return non-clean URL's for anonymous users & Administration menu returns Clean urls for logged in users. Hitting the "Clear cached data" button on the performance page made it work... except that Image Assist links are now incorrect for logged in users. Long story short this is incompatible with drupal's cache_menu & cache_filter tables from my 20 minutes of testing. It would be very useful for sites that never change their html since you could cache it in the browser for like 10 minutes instead of never like it does currently.
cache_clear_all(NULL, 'cache_menu');&cache_clear_all(NULL, 'cache_filter');Should be called on every page generation to ensure that only anonymous users get clean URLs and logged in users get non-clean URLs. This is only beneficial for a narrow range of sites... if you wish to run like that, be sure to remove this section from your .htaccess file.<FilesMatch "(\.html\.gz|\.html)$"><IfModule mod_headers.c>
Header set Expires "Sun, 19 Nov 1978 05:00:00 GMT"
Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
</IfModule>
</FilesMatch>
and apply this patch.
#3
might as well add a setting for this...
#4
committed
#5
Automatically closed -- issue fixed for 2 weeks with no activity.