I have an issue with Lyla Captcha that I just don't understand. There is a
function called getHashReference() inside the captcha service which always
returns an empty string. So it looks like the LRU (Least Recently Used)
cache is not working.

I emailed Mr Lyla Captcha (Peter Farrell) and he said the problem was likely
to be:
"You must init the captchaService into a persistent scope (i.e.
application).  I'm thinking you're reloading your application on each
request or having singleton='false' on in ColdSpring."

but I have ColdSpring config file:

<!-- Lyla Captcha Service -->
 <bean id="captchaService" class="cfc.captcha.captchaService"
init-method="setup" singleton="true">
  <constructor-arg name="configFile">
    <value>config/captcha.xml.cfm</value>
  </constructor-arg>
</bean>

And I am using the Fusebox-ColdSpring lexicon to retrieve the service, which
I place in the application scope at start up:

<cs:get bean="captchaService"
              returnvariable="application.captchaService"
              coldspringfactory="servicefactory" />

So my questions are:

1. Has anyone ever implemented Lyla Captcha using ColdSpring and may know
what is happening here?
2. Can you think of something I am not doing right?

Any help gratefully received,

Stephen

Reply via email to