Vuillemot, Ward W wrote: > There is a Apache::Session which is sufficient to check to see if they are > logged in, et cetera. > But I want to be able to remember the last query so that I can return > results into multple pages along with memory of where in the stack I am at.
You can store anything in Apache::Session; it's just a persistent hash table. However, storing query results based on a user's session is not a good idea! What if your users open up two browser windows and tries to do a search in each one? Server-side session data is global to all browser windows, so they'll get bizarre and incorrect results. If you check any of the major sites you'll see that they handle multiple windows correctly. My suggestions would be to have a separate cache just for query results. Turn the sorted query parameters into a key. If someone goes to page 2 of the results, you just pull them out of the cache. > There are persistent modules, but I am wondering if there is a better way > with Apache and mod_perl There have been a few benchmarks of ways to store a persistent hash. I'll have some new numbers on this soon, but for now I'd suggest looking at Cache::Cache, MLDBM::Sync, or Cache::Mmap. - Perrin