[Bese-devel] isolated actions

Evrim ULU evrim at core.gen.tr
Tue Apr 4 20:51:47 UTC 2006


Drew Crampsie wrote:

> :isolate should be used when you only want an action to fire once,
> even if the same link is clicked or the page reloaded.
>
> For example, if i have an 'charge-credit-card' action, i would not
> want a reload of the page or a 'back-button, click same link' to
> charge the card _again_ (well, i wouldn't mind, but the customer might
> be pissed). :ISOLATE memoizes the action body so that it will only run
> once, regardless of how many times the same URL is hit.
>
> The attached patch is against a slightly older ucw_dev. If it no
> longer applies cleanly, the replacement code for DEFACTION follows
> (and RUN-ISOLATED can be removed from standard-component.lisp).

That's great, there is one point i want to learn. If an action must be
isolated, do we need the same action as unisolated? It seems they'r
mutually exclusive. So, instead of hacking defaction, something like
defisolated-action would work better IMHO. What do you think?

king regards,
evrim.



More information about the bese-devel mailing list