Let me see if I got this figured out:
About CFFILE:
You're saying that if I read lots of times from the file and just doing
one update (daily, off-hours) I just need to exclusive lock this one cffile
write once?
no lock around cffile read? or include that uses the same file?
you see - I'm generating once a day a designed html page with the latest
news flashes.
this page is included in alot of my other pages in the site. <cfinclude>
but it is only updated by a single process that I scheduled through
CF-Admin.
About CFHTTP:
I'm not writing CFHTTP into file directly. most of the times I'm checking to
see
wheter the information in Cfhttp.filecontent is the info I need and then I
put it
into file using CFFILE write, do I still need to lock it up?
again, only CF-Admin (via schedule) runs the cfhttp requests, but there are
at least 10 requests per template, and about 3 templates that may run
simulatniously.
thanks for answering!
Michael Lugassy
----- Original Message -----
From: "Daniel Kemp" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, June 03, 2001 4:56 PM
Subject: RE: cfhttp/cffile locking?
> > -----Original Message-----
> > From: Michael Lugassy [mailto:[EMAIL PROTECTED]]
> >
> > I've heard that I need to lock cffile and cfhttp also?
> > Is that right?
>
> If you're reading from a file, which is never going to be updated,
> written to, or otherwise manipulated, then you do not need to lock a
> cffile.
>
> If other pages in your application, or other applications on your
> server write to the file, then you *do* need to lock the cffile, (for
> both the read and write).
>
> You need to lock the cfhttp if it's saving the retrieved page into a
> file.
>
> If you don't lock file access, you can have two pages trying to update
> the same file at the same time, this *may* cause problems.
>
> >From the help file:
>
> Using CFLOCK around file manipulation constructs can guarantee that
> file updates do not fail due to files being open for writing by other
> applications or ColdFusion tags.
>
> > what SCOPE should I use?!
>
> I would assume that you should the server scope, and chances are
> you'll want your type set to exclusive, even if you're just reading
> from the file.
>
> Hope this helps,
>
> Dan.
>
>
>
> This message is intended only for the use of the person(s) ("the intended
recipient(s)") to whom it is addressed.
>
> It may contain information which is privileged and confidential within the
meaning of the applicable law.
> If you are not the intended recipient, please contact the sender as soon
as possible.
> The views expressed in this communication may not necessarily be the views
held by Live Information Systems Limited.
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists