I've had to deal with a similar problem. My solution was to use a file-based session object (instead of a database-based session object). Whenever I needed a value (like user_id) I would look first in the file-based session for it. If it wasn't there, I'd pull it from the database, then add it to the file-based session, so it would be there next time. This is basically just a simple caching scheme. It limits your database hits to only the first time data is needed. Every time thereafter it comes from the cache. Note that you can use mysqlite as your file cache, so it still looks like a DB, eventhough it's file-based.
Just take care to expire sessions upon logout, after updates, etc.
In reply to Re: CGI::Application::Plugin::Authentication posthook?
by scorpio17
in thread CGI::Application::Plugin::Authentication posthook?
by metaperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |