efficient ajax calls using flash?

The other option would be to store it in the session(not the flash - that doesn't stick around between requests), but if you're using the database as the session store, then it's the same thing. You Could also insert the ID or whatever you need to store into the AJAX params, that way it would be "stored" in the HTML on the client machine.

Eric Gross wrote:

1.) Neither Flash nor Session are stored on the client machine. They are all on the server.

2.) By default, rails stores session information on the filesystem. This is fine, unless you need to share sessions across servers in which case you can have Rails store session data in the database. It’s easy if you want to go that route. Google it.

3.) Yes, running a one-item query by ID is the easiest thing a DB server can do. Unless you want to do :select => ‘SQL_CACHE *’ which will do a cached query, thus increasing database speed as much as humanly possible.