> Niphlod, I'm not sure what you're referring to by the "user" parameter. > The closet parameters to "user" would be "session" and "public". But I > don't see these options helping to differentiate between logged in and > non-logged for caching. >
The "session" arg doesn't differentiate between logged in states, but it can be used to cache a user-specific page -- you would need to add some logic to determine whether to do that. You can also make use of the "prefix" argument, and maybe set it to auth.user_id. But again, not sure it's a good idea to use server-side caching for every logged in user. > Anthony, my problem still persists with your code; the "public" parameter > does not seem to be the proper parameter for this problem. > The "public" parameter is not intended to differentiate between logged in states, only to ensure the cached page remains private to the user. For example, when a user first hits the page (not logged-in), the public > parameter will be set to True. This will cache the page in it's non-logged > in state. If the user then logs in, and hits the page again, the browser > will serve the non-logged-in version of the page from cache. > True. Is it feasible to add an arg to the URL to flag the logged in state? Otherwise, as you have figured out, there is no way for the browser to know a new version of the page must be requested. I suppose you could use Etags or last-modified and have the server respond with a 304, but that still involves a round trip to the server. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

