Highlighted

CFCLASSES Folders

LEGEND ,
Jun 22, 2006

Copy link to clipboard

Copied

How does anyone here deal with the cfclasses folder?

Our application dynamically generates ColdFusion files and sometimes
also deletes them, but ColdFusion never removes any old files from the
cfclasses folder. Has anyone come up with any clever solutions on how
to resolve this. I've thought about using a scheduled task to remove
any class files which may be older than a certain date, knowing full
well that they could still be legitimate files.

But unfortunately cfdirectory does not allow you to filter on dates or
limit the number of rows.

Any ideas are welcome.

Thanks
TOPICS
Advanced techniques

Views

2.1K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

CFCLASSES Folders

LEGEND ,
Jun 22, 2006

Copy link to clipboard

Copied

How does anyone here deal with the cfclasses folder?

Our application dynamically generates ColdFusion files and sometimes
also deletes them, but ColdFusion never removes any old files from the
cfclasses folder. Has anyone come up with any clever solutions on how
to resolve this. I've thought about using a scheduled task to remove
any class files which may be older than a certain date, knowing full
well that they could still be legitimate files.

But unfortunately cfdirectory does not allow you to filter on dates or
limit the number of rows.

Any ideas are welcome.

Thanks
TOPICS
Advanced techniques

Views

2.1K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 22, 2006 0
LEGEND ,
Jun 22, 2006

Copy link to clipboard

Copied

There is an Administrator setting that limits how many class files to
keep on hand. I would check that out first.

Don Vaillancourt wrote:
> How does anyone here deal with the cfclasses folder?
>
> Our application dynamically generates ColdFusion files and sometimes
> also deletes them, but ColdFusion never removes any old files from the
> cfclasses folder. Has anyone come up with any clever solutions on how
> to resolve this. I've thought about using a scheduled task to remove
> any class files which may be older than a certain date, knowing full
> well that they could still be legitimate files.
>
> But unfortunately cfdirectory does not allow you to filter on dates or
> limit the number of rows.
>
> Any ideas are welcome.
>
> Thanks

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 22, 2006 0
LEGEND ,
Jun 22, 2006

Copy link to clipboard

Copied

You sure. I just checked it now and I can't see it. What's it called.

Or are you talking about trusted templates, which is something entirely
different.


Ian Skinner wrote:
> There is an Administrator setting that limits how many class files to
> keep on hand. I would check that out first.
>
> Don Vaillancourt wrote:
>> How does anyone here deal with the cfclasses folder?
>>
>> Our application dynamically generates ColdFusion files and sometimes
>> also deletes them, but ColdFusion never removes any old files from the
>> cfclasses folder. Has anyone come up with any clever solutions on how
>> to resolve this. I've thought about using a scheduled task to remove
>> any class files which may be older than a certain date, knowing full
>> well that they could still be legitimate files.
>>
>> But unfortunately cfdirectory does not allow you to filter on dates or
>> limit the number of rows.
>>
>> Any ideas are welcome.
>>
>> Thanks

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 22, 2006 0
LEGEND ,
Jun 22, 2006

Copy link to clipboard

Copied

I was talking about this:

Server Settings > Caching

Maximum number of cached templates

Limits the number of templates cached using template caching. If the
cache is set to a small value, ColdFusion might re-process your
templates. If your server has a sufficient amount of memory, you can
achieve optimum performance by setting this value to the total number of
all of your ColdFusion templates. Setting the cache to a high value does
not automatically reduce available memory because ColdFusion caches
templates incrementally.

But I guess that is the amount of templates in memory not on the hard
drive. Sorry.

Don Vaillancourt wrote:
> You sure. I just checked it now and I can't see it. What's it called.
>
> Or are you talking about trusted templates, which is something entirely
> different.
>
>
> Ian Skinner wrote:
>> There is an Administrator setting that limits how many class files to
>> keep on hand. I would check that out first.
>>
>> Don Vaillancourt wrote:
>>> How does anyone here deal with the cfclasses folder?
>>>
>>> Our application dynamically generates ColdFusion files and sometimes
>>> also deletes them, but ColdFusion never removes any old files from
>>> the cfclasses folder. Has anyone come up with any clever solutions
>>> on how to resolve this. I've thought about using a scheduled task to
>>> remove any class files which may be older than a certain date,
>>> knowing full well that they could still be legitimate files.
>>>
>>> But unfortunately cfdirectory does not allow you to filter on dates
>>> or limit the number of rows.
>>>
>>> Any ideas are welcome.
>>>
>>> Thanks

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 22, 2006 0
LEGEND ,
Jun 22, 2006

Copy link to clipboard

Copied

There's an option in CF Administrator not not even create these files in
the first place. "Save class files". I think it's on the "cache" page, or
something.

The only time they're used is when the server is restarted, to save the
server recompiling the source code files: quite a large - one off -
performance hit.

On the other hand, if they exist, the server needs to check the timestamp
on the files *every time* they're called, which has a slight performance
impact.

--
Adam

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 22, 2006 0
LEGEND ,
Jun 23, 2006

Copy link to clipboard

Copied

Hmm!

I know about this option. But clients will freak out a lot if the
application takes a long time to recompile the classes after a restart.

I just ran a test on my test computer not nice. Really not nice if you
run a dozen sites on one install.

What sucks about all this is that I can't do a "rm -f *" under Linux
cause it causes the shell to crash. So I need to do a "rm -f `ls -1 |
head -n2000`" which is a real pain in the butt.

Thanks


Adam Cameron wrote:
> There's an option in CF Administrator not not even create these files in
> the first place. "Save class files". I think it's on the "cache" page, or
> something.
>
> The only time they're used is when the server is restarted, to save the
> server recompiling the source code files: quite a large - one off -
> performance hit.
>
> On the other hand, if they exist, the server needs to check the timestamp
> on the files *every time* they're called, which has a slight performance
> impact.
>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 23, 2006 0
New Here ,
Sep 14, 2019

Copy link to clipboard

Copied

Shell tip: anytime you use wildcard (the * char) the shell will expand it to all the file names. When this list becomes long, it can easily exceed the max length of the command line buffer. This should not cause the shell to crash, but instead emit an error message. You can easily use the 'find' utility instead., with the '-exec' option. Example for this situation: "find . -name '*.class' -exec rm {} \;"

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 14, 2019 0