Issue Details (XML | Word | Printable)

Key: FWK-88
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Antoine Véret
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JCaptcha Framework

Garbage collecting should be provided by each CaptchaStore implementation

Created: 28/Dec/07 10:34 AM   Updated: 23/Dec/08 01:01 AM
Component/s: EXTENSION EHCACHE, EXTENSION JBOSSCACHE, SERVICE
Affects Version/s: 1.0_RC6
Fix Version/s: 2.X


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

Sort Order: Ascending order - Click to sort in descending order
David Hay added a comment - 23/Dec/08 01: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.