Closed (works as designed)
Project:
Authenticated User Page Caching (Authcache)
Version:
6.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Mar 2009 at 00:49 UTC
Updated:
14 Sep 2012 at 08:34 UTC
Comments
Comment #1
Jonah Ellison commentedInteresting idea, though you are right about it not reducing server resources and just giving the appearance of being faster, since the Ajax phase would have to render the HTML as a normal Drupal page request and send the result, then have the client parse & modify the DOM, which may cause some additional lag since the speed of JavaScript processing isn't the best. I'd be interested if you come up with anymore thoughts of this implementation or anything similar.
Requiring the final HTML be the same is definitely the greatest limitation of this module, but it also offers the greatest speed advantage. Once cached, it is extremely quick to retrieve and send to the browser. Also, once the browser has the page in its own cache, it stays there and the HTML doesn't have to redownload if the page hasn't been modified (Authcache uses the HTTP 304 Not Modified header), making the site appear even faster. So that's the tradeoff: speed in exchange for more development time for each dynamic piece of content.
Comment #2
mikeytown2 commentedAnother idea would probably involve some major mods to drupal. Have each element of the theme report if it's dynamic... (user input/behavior can change it). So Most elements would be static, and only the dynamic parts would then have to be processed. It would probably require a this-is-not-dynamic flag to be set in each module and theme, or...? It would be something to consider for 8.x, in order to support more exotic caching.
Going along these lines, have a cache for each input and output for a function. If the input's are the same (compare hash of it), serve the output straight from the cache; if different, calculate the output and store it for future use. This if implemented perfectly would allow for no expirations on caches. Taking D7's code registry to a whole new level. Each function knows what variables can change it's output, so if one of those variables changes then that function needs to be reprocessed.
Comment #3
moshe weitzman commentedFor a function cache, perhaps borrow ideas from http://drupal.org/project/pressflow_preempt
Comment #4
fanzila commentedsubscribe :)
Comment #5
simg commented@mikeytown2
>It would probably require a this-is-not-dynamic flag to be set
isn't this functionality already pretty much provided by the block->cache value ?
Comment #6
simg commented