Garbage collecting should be provided by each CaptchaStore implementation

Description

The AbstractManageableCaptchaService should not implement the garbage collecting. Add a garbageCollect method to the CaptchaStore API and update all implementations

Environment

None

Activity

Show:
David Hay
December 23, 2008, 12:01 AM

I'll provide a use case for why this feature is important. I'm working on a implementation of a databased backed CaptchaStore to allow JCaptcha to work in a clustered environment. The current implementation of the AbstractManageableCaptchaService calls the CaptchaStore method getSize three times during the course of generating a captcha, which means that three identical queries are invoked. In addition, the service also maintains a Map of timestamps to do the garbage collection. The CaptchaStore could do this more efficiently by deleting all records older than some timestamp.

Assignee

Unassigned

Reporter

AntoineV

Labels

None

Fix versions

Affects versions

Priority

Major
Configure