Here's an example...


I have an application where I store user settings in a CFC. Also, I have a
couple of standard functions in the CFC (login, logout, etc.).


Yes, I know that I could use a session-level structure to store the user
settings, but it so much simpler to invoke session.userCFC, pass in the
settings, and then invoke the login() function.  The ease of use more than
makes up for the extra few bytes of memory being used.


As far as performance goes, I'm seeing <10ms load times for most of my
pages, and this includes parsing through several queries (most of which are
also stored in the session).

--

Michael Wolfe
[EMAIL PROTECTED]


  _____  

From: Michael Dinowitz [mailto:[EMAIL PROTECTED]
Sent: Monday, February 02, 2004 7:15 PM
To: CF-Talk
Subject: CFC or Struct in session

I've been reading in a number of places where people place a reference to a
CFC in a users session variable. This has always seemed strange to me. Why
not cache the CFC for the application and only store the users data in a
session struct. Is there something I'm missing about saving an entire CFC
reference per user? Doesn't it have a higher overhead? Is there a
performance savings?
I'm going to bash on this tomorrow and find out myself, but if someone can
post their reasoning, I'd appreciate it.
Thanks
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to