[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] RFC: CGI::Application::Plugin::CAPTCHA



On Aug 25, 2005, at 8:43 AM, Jason A. Crome wrote:

- Image storage: I can either create the images on the filesystem, or build them in a memory-based cache (which would mean the plugin needs to add a runmode that returns an image only - doesn't sound like the best way to me). In any case, there needs to be a good way of cleaning up old images. Suggestions?

- Session management: We need a good place to store the session id => captcha mappings. An in-memory cache would be good, but if we're already using a session management mechanism, why not use it? Problem is how do we integrate with multiple session management mechanisms? My thought, for now, would be to have an in- memory cache, and if the programmer is using CAP::Session to use it instead,

I think Cache::FileCache would both of these problems. You can set many options from new() including an expire time. With that you could store whatever information you wanted in one place. I'm using it at the moment to store large pages in a database front end that I maintain to cut down on the amount of selects that I do. It lets me store arbitrary information in a single place just by checking $cache_filecache->get() can get what I want, and if not, regenerating it.

Now, granted, this application is pretty small and hardly ever has any more then about ten people using it at the same time so I haven't had to worry about performance. There is Cache::Memcached that uses the same api in case you need the benefits of a memory based cache setup.

    Anyway, just an idea.


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.