> <cffunction name="init">
So the instance of the CFC this is in is in the application
scope, yes?
> <cflock name="seoSettingsLock" type="exclusive"
timeout="120">
I can see a potential problem here (it depends on the calling
code, though,
really)... are you controlling how many requests call this
code, eg: by
checking if all this work needs to be done? I would expect
that check to
be immediately around the lock. If there's no check, you'll
get a bag load
of requests queuing up for up to two minutes for this lock to
clear. In
the mean time if the lock clears, then another request will
start
reprocessing the code within the lock. Surely you don't want
that to
happen.
> <cfloop query="getURLs">
> <cfset urlInfo = structNew()>
> <cfset linkInfo.URL = url>
> <cfset linkInfo.pageTitle = pageTitle>
If this code is in a CFC instance that's in the application
scope, you have
a potential ptoblem here in that your not VARing any of your
variables, so
they're global to the [shared] CFC instance, not local to the
function. I
can't see how this would directly cause what you're seeing,
but it is
generally an open door for "unexpected behaviour".
If you intend these variables to be in the CFC's variables
scope, not local
to the function, can I recommend you always scope them, to
make it clearer.
If you had said "variables.urlInfo" I'd surmise you meant it
to be in the
variables scope, not just putting it there by accident.
> <cfset structInsert(this.urlsByStatic, staticURL,
linkInfo)>
Do you really mean to be putting that in the THIS scope? IE:
public to the
calling code? I'm not quite sure what you're exposing here,
as this
variable doesn't seem to match the similar-named this.urls
you use
elsewhere.
> <cfset info = "">
I'm running on the notion that the CFC instance is in
application scope.
So all calls to this method will be sharing this "info"
variable.
One call to it could be setting it to ""...
> <cfif structKeyExists(this.urls, keyURL)>
> <cfset info = this.urls["#keyURL#"]>
... whilst another request is here.
> <cfset info.foundResult = true>
So by the time the line above gets executed, info is "", not
the value you
were hoping it to be, by setting it on the line above.
This is probably the cause of your problem.
--
Adam