Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Need guidance changing to Client Store from Registery

Engaged ,
Aug 26, 2009 Aug 26, 2009

Hello all,

I decided to pick up my Advanced CF development book I bought 3 years ago when I began creating CF sites.  Something that has caught my attention was managing session states, particularly that the best practice is to use a Client Store in a database.  Previously, I had used the CF server default of Registery to manage my user sessions.  While my site traffic is very low and having the registery store the user data isn't currently a problem, I wanted to take the time to correct this so in future developments, I'm using the Client Store instead.  The book provided step-by-step instructions to set up the client store, which I have done.  What it doesn't give in detail is how my pages should now be coded to take advantage of the client store.

Could anyone provide some references or code examples for how I should be handling user sessions on my site now that the server is set to a client store?  My pages currently use code generated by Dreamweaver, using <cflock>, scope="Sessions" and Session.MM_Username to authenticate to the website pages.  I've heard that once using client store, you no longer need the <cflock> as the database handles this?  I'd really just like to see how to rebuild my pages using correct authenitcation and client variables rather than sticking with this code-generated stuff.  thanks in advance

note:  I do know in application.cfm, I include <cfapplication name="myUsers" sessionmanagement="yes" clientstorage="sessiondb">

That's all the further the book details.

578
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 26, 2009 Aug 26, 2009

It should be clientmanagement, not sessionmanagement. I would start with something like

<cfapplication
    name = "myUsers"
    applicationTimeout = #CreateTimeSpan(1, 0, 0, 0)#
    clientManagement = "yes"
    clientStorage = "sessiondb">

Then, throughout your application, you simply define the client variables as follows:

<cfset client.favourite_colour="green">

There is more in the livedocs on using persistent data .Read everything on client variables within 8 clicks on the forward arrow in the top r

...
Translate
Community Expert ,
Aug 26, 2009 Aug 26, 2009

It should be clientmanagement, not sessionmanagement. I would start with something like

<cfapplication
    name = "myUsers"
    applicationTimeout = #CreateTimeSpan(1, 0, 0, 0)#
    clientManagement = "yes"
    clientStorage = "sessiondb">

Then, throughout your application, you simply define the client variables as follows:

<cfset client.favourite_colour="green">

There is more in the livedocs on using persistent data .Read everything on client variables within 8 clicks on the forward arrow in the top right-hand corner.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 27, 2009 Aug 27, 2009
LATEST

Thanks!  I'm going to dive into this doc right now

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources