Just wanted to know if a community member could volunteer to add this
to the wiki?
I'm thinking a separate FAQ entry because could link to it from plugins
and filters entries. Like so:
http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/wiki/IntroToPlugins#LoginPlugin
One step to be aware of is to remember to *delete* the saved event
object after you use get it. Typically, I'm using a session facade
object so my explicitly named getter - getSavedEventPostLogin() method
either returns an object or nothing so I can use IsObject() on the
returned data *and* if an object exists -- it clears it. There is no
sense for it to hang around in memory once used and also it ups the
chance of somebody triggering it hours down the line (due to a coding
problem or something).
Another thing to be aware of is saving the event to a session when
search engine spiders come for a visit. Typically, a spider will
trigger a new session on each request because it doesn't keep cookies.
So you might look into session management when it comes to bots. On
one system, we engineered the onSessionStart logic to differ when the
user agent was a know spider -- a) there session was set to 1 minute b)
a whole ton of session objects weren't created. In regards to b), you
may have to change your session facade to return dummy data if an
object doesn't exist. For example, we normal instantiate a cart object
into the session scope. For bots we did not. So calling,
getTotalCartItemCount() would return a 0 if a cart object hadn't been
instantiate.
Brian FitzGerald said the following on 11/17/2009 03:16 PM: