Posted by soxofaan on July 10, 2007 at 2:13pm
As expected captcha does not play nice with page caching: the captcha system wants each form to have a different challenge. With the current implementation of captcha (and also my rewrite), when caching is enabled, each anonymous users gets the same challenge. Only the first user that requested the form will be able to successfully solve the captcha because the solution is in his session, all other users can't pass the captcha challenge.
We could do something like http://drupal.org/project/cacheexclude (or even depend on that module) and clear the page cache for each page with a form with a generated captcha on the hook_exit phase.
any thoughts on this?

Comments
Variables
When you add a captcha to a form, simply set $GLOBALS['conf']['cache']to FALSE (http://heine.familiedeelstra.com/new-math-captcha-for-drupal).
thanks
Thanks a lot!
I knew there would be a such a simple solution for this.
for those interested in the matter: this also works:
<?phpglobal $conf;
$conf['cache'] = FALSE;
?>
Can I add above logic in template file
Can I add the above logic inside template or I have to write module for it.