简体   繁体   中英

ColdFusion Client vs Session Variables

I have a largish application that runs fine and uses session variables widely

We wish to push it into the cloud and run multiple instances. Unfortunately our cloud partner doesn't offer SSL stick sessions and even if they did, im not sure that would be the way to go.

What I would rather do is not rely on a user maintaining a session on a server and I can achieve this using Client variables.

I'm wondering however if there are any downside, is it overly slow are there certain variable types that dont work with Client variables structs / queries etc?

There are over 1500 lines of code using session variables, and I could just do a search and replace or I do I need to go through hundreds of components and rethink each one.

Yes, client variables are limited in what they can store.

From the docs : Client variables must be simple data types: strings, numbers, lists, Booleans, or date and time values. They cannot be arrays, recordsets, XML objects, query objects, or other objects.

Client variables limited to simple variables like strings, numbers etc. But I do use client variable to store structure and array by serializing to JSON. In many sites I have used to client variable to remember form field values (specially search criteria) so when user come back we can get them their last status.

What I just need to do that while storing into client serialize it and to get it back deserialize.

Hope this help

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM