[Radiant] Core Page Render Methods

Sean Cribbs seancribbs at gmail.com
Wed Oct 11 11:10:39 CDT 2006


Commentable redefines process(request, response).  The purpose of this is to
capture POST requests for creating comments.  It also redirects back (doubly
in some cases) after completing the POST operation.

The double-redirect is kind of a hack/kludge that circumvents page caching
-- Radiant was caching the redirect, which resulted in an endless redirect
loop.  Essentially, if the Commentable page received a POST, it processes
then redirects to the Comments/CommentBucket child page which clears the
cache item for its parent/Commentable page and redirects back to it. Now,
you could say that I should just make the Commentable page uncached and
avoid this brouhaha, but I wanted the opportunity for greater performance,
and the number of page requests/time unit will always be an order of
magnitude greater than the number of posted comments/time unit unless you're
getting D.O.S.'d or spammed.

Ideally, I'd like to see a flexible caching mechanism that doesn't cache
POST results, or alternatively, a different method (in the Ruby sense) for
handling POST requests vs. GET requests.  Of course, in the future,
Commentable will use real models and not page hacks!

Sean Cribbs
seancribbs.com

On 10/11/06, Alexander Horn <alex.horn at gmail.com> wrote:
>
> Currently behaviors have access to render*() and parse*() methods:
>
> Behavior::Base render/parse methods:
>
> * process(request, response)
> * render()
> * render_part(part_name)
> * render_snippet(snippet)
> * render_text(text)
> * parse(text)
> * parse_object(object)
>
> Question:
>
> Are you relying on these methods listed above in your behavior?
> In other words, do you redefine these methods inside your behavior class?
>
>     1.2) If yes, which methods are you overwriting?
>     1.1) What functionality do you intend to provide when altering
> these methods?
>
> Your response directs our efforts to redesign the page class. Thanks,
>
> --
> Alexander Horn
> http://www2.truman.edu/~ah428
> _______________________________________________
> Radiant mailing list
> Post:   Radiant at lists.radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.radiantcms.org/pipermail/radiant/attachments/20061011/ee2fafaa/attachment.html


More information about the Radiant mailing list