Re: Re: RE: [ACFUG Discuss] cf 7 bug?
please don't respond to the obvious security concerns in the code below... im aware! On 10/17/06, Steven Ross [EMAIL PROTECTED] wrote: cfscript adminObj = createObject(component,cfide.adminapi.administrator); adminObj.login(cfide_password); //cfide_password is set in cfide.cfm // Instantiate the runtime object. myObj = createObject(component,cfide.adminapi.runtime); // clear cache myObj.clearTrustedCache(); /cfscript On 10/17/06, Charlie Arehart [EMAIL PROTECTED] wrote: Steven, are you just turning off the trusted cache? Or actually flushing the template cache as well? Show us the Admin API call you're using. /charlie http://www.carehart.org/blog/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Ross Sent: Monday, October 16, 2006 4:41 PM To: ACFUG ColdFusion Discussion Subject: [ACFUG Discuss] cf 7 bug? Anyone using trusted cache and clearing it with the admin API? If so do your CFC's still remain? We are trying to find out if this is a bug or not. Thanks, Steven -- Steven Ross web application interface developer http://www.zerium.com [mobile] 404-488-4364 [fax] 928-484-4364 - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com - - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com - -- Steven Ross web application interface developer http://www.zerium.com [mobile] 404-488-4364 [fax] 928-484-4364 -- Steven Ross web application interface developer http://www.zerium.com [mobile] 404-488-4364 [fax] 928-484-4364 - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -
Re: RE: [ACFUG Discuss] cf 7 bug?
cfscript adminObj = createObject(component,cfide.adminapi.administrator); adminObj.login(cfide_password); //cfide_password is set in cfide.cfm // Instantiate the runtime object. myObj = createObject(component,cfide.adminapi.runtime); // clear cache myObj.clearTrustedCache(); /cfscript On 10/17/06, Charlie Arehart [EMAIL PROTECTED] wrote: Steven, are you just turning off the trusted cache? Or actually flushing the template cache as well? Show us the Admin API call you're using. /charlie http://www.carehart.org/blog/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Ross Sent: Monday, October 16, 2006 4:41 PM To: ACFUG ColdFusion Discussion Subject: [ACFUG Discuss] cf 7 bug? Anyone using trusted cache and clearing it with the admin API? If so do your CFC's still remain? We are trying to find out if this is a bug or not. Thanks, Steven -- Steven Ross web application interface developer http://www.zerium.com [mobile] 404-488-4364 [fax] 928-484-4364 - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com - - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com - -- Steven Ross web application interface developer http://www.zerium.com [mobile] 404-488-4364 [fax] 928-484-4364 - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -
[ACFUG Discuss] Adobe MAX - Las Vegas
Please give a shout if you are going to Vegas. There are a few fun things that ACFUG / Atlanta BOF (Birds of a Feather) people have thought of doing. So far for nightly entertainment Enjoy a decadent meal (I'm in) A Vegas show (Doing that too) A movie night (The Prestidge is currently the highest vote on the list) A strip club (This is the place you'll the best, not amatuer shows you see locallyand it stays in Vegas, baby!) Golf (Bring your clubs) Dance club (I'm soo there) Also, we may converge for breakfast (if you wake early enough) or lunch. I'll bring something to signify where we could meet and munch. Precia ps PLEASE RESPOND TO THIS EMAIL AT [EMAIL PROTECTED] pps To hook up, call me at 404.725. or keep in touch with me through gTalk at [EMAIL PROTECTED] - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink -
RE: RE: [ACFUG Discuss] cf 7 bug?
Ok, yes, that is clearing the cache. (There is also an available API call to turn the trusted cache on and off, which would be different.) Indeed, the name of this method is a misnomer: it doesn't clear the trusted cache but instead just clears the template cache. The trusted option simply controls whether CF should look for newly updated files before loading them if it already has them in the cache. All that said, what's the problem you're experiencing? Is it that you change CFCs and reload, but don't see them? That may instead be caused by problems in the underlying Java class files. If you want to confirm it, turn off the save class files option in the Admin, and restart CF (to be safe), then request your file. Now, that alone may cause it to pick up the changed files, but you want to go a step further and change the CFC again and reload it, and confirm if now those are indeed picked up. If so, the save class files was what was burning you. I've seen this before, but don't know for sure what causes it, though it may be related to a problem I reported back in 2002 at: http://cfmxplus.blogspot.com/2002/11/alert-when-cf-will-fail-to-auto.html The gist was that I observed problems when you move files from one server to another, where the CFML file being copied has an older datetime that the file already compiled class file. There were some interesting nuances, but it may be that just doing a touch to update the file (on the copied to server) so it's more recent than the class file may solve it. (That was then, in like 6.0. Things may be different now.) There are a few ideas to chew on. /charlie http://www.carehart.org/blog/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Ross Sent: Tuesday, October 17, 2006 12:50 PM To: discussion@acfug.org Subject: Re: RE: [ACFUG Discuss] cf 7 bug? cfscript adminObj = createObject(component,cfide.adminapi.administrator); adminObj.login(cfide_password); //cfide_password is set in cfide.cfm // Instantiate the runtime object. myObj = createObject(component,cfide.adminapi.runtime); // clear cache myObj.clearTrustedCache(); /cfscript On 10/17/06, Charlie Arehart [EMAIL PROTECTED] wrote: Steven, are you just turning off the trusted cache? Or actually flushing the template cache as well? Show us the Admin API call you're using. /charlie http://www.carehart.org/blog/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Ross Sent: Monday, October 16, 2006 4:41 PM To: ACFUG ColdFusion Discussion Subject: [ACFUG Discuss] cf 7 bug? Anyone using trusted cache and clearing it with the admin API? If so do your CFC's still remain? We are trying to find out if this is a bug or not. Thanks, Steven -- Steven Ross web application interface developer http://www.zerium.com [mobile] 404-488-4364 [fax] 928-484-4364 - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com - - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com - -- Steven Ross web application interface developer http://www.zerium.com [mobile] 404-488-4364 [fax] 928-484-4364 - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com - - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -
Re: [ACFUG Discuss] Adobe MAX - Las Vegas
Good thing you brought it up... I wanted to have a decadent meal at Bobby Flay's Mesa Grill. If we can get a headcount, I'll see about getting a reservation. http://www.bobbyflay.com/mesa-vegas.asp As a consumer of strip clubs, I'd be happy to lead that charge! I'll probably just rent a set of clubs, but plan on playing Sunday and Monday if anyone wants to join. I'm up for movies and clubbing as well. I plan on playing some blackjack if that suits peoples fancy. Cheers, S Shawn Gorrell Web Development Applications Architect Federal Reserve Bank - Atlanta Office (404) 498-8449 Precia [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 10/17/2006 01:38 PM Please respond to discussion@acfug.org To discussion@acfug.org, [EMAIL PROTECTED] cc Subject [ACFUG Discuss] Adobe MAX - Las Vegas Please give a shout if you are going to Vegas. There are a few fun things that ACFUG / Atlanta BOF (Birds of a Feather) people have thought of doing. So far for nightly entertainment Enjoy a decadent meal (I'm in) A Vegas show (Doing that too) A movie night (The Prestidge is currently the highest vote on the list) A strip club (This is the place you'll the best, not amatuer shows you see locallyand it stays in Vegas, baby!) Golf (Bring your clubs) Dance club (I'm soo there) Also, we may converge for breakfast (if you wake early enough) or lunch. I'll bring something to signify where we could meet and munch. Precia ps PLEASE RESPOND TO THIS EMAIL AT [EMAIL PROTECTED] pps To hook up, call me at 404.725. or keep in touch with me through gTalk at [EMAIL PROTECTED] - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink - - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink -
Re: RE: RE: RE: [ACFUG Discuss] cf 7 bug?
Ok I gotcha, thanks Charlie. I'm not sure why this is happening to them. I can ask about a SVN issue but, I don't think that is what is going on. My original question was concerning code not showing up on an existing server after they use the admin api to clear the trusted cache. Ie: they put new code into prod, clear the cache and only the cfm files are reloaded not the cfc's. A co-worker tested this on his windows box and therein might lie the problem. This site is running on Solaris in production. I thought by what you said that the clearing of the trusted cache will only remove the cfm files and not the cfc's? I will ask about the class files being saved. This isn't something they can really fiddle with in production since the 9 machine cluster is serving some serious traffic. -Steven On 10/17/06, Charlie Arehart [EMAIL PROTECTED] wrote: Well, I want to be clear: you say they don't want to restart the server, but I assume you mean when it comes time to push new code. That's not what I was referring to when I talked about restarting the server. I was referring just to a one-time turning off of the save class files option. And even then, I realize that there are good reasons for it to be enabled in production. I was just proposing it as a work-around for the problem you were hitting. But then you also mention that your guy is proposing using the precompiled templates option. That will then require use of the class files. As for his assertion that someone restarted the server whenever they did a push, that seems pretty harsh. With the new admin API ability to clear the template cache, it would seem no longer required. (And since doing that didn't solve your problem, I'd say that those are different points of concern.) In fact, since you're using CF 7, you may want to investigate this useful article from Adobe on causing uploaded files to auto-trigger a cache flush: http://www.adobe.com/devnet/coldfusion/articles/cacheclear.html But is your original point (about a changed CFC not showing up in a request) related to deployment of code to a new server? If so, then I recommend again that you consider the point I'd raised (about the possibility that the file date on the uploaded server is newer than the file date of the file being uploaded, as can happen if you use source control and roll back to an earlier version on your dev/staging server.) Hope that's all helpful. /charlie http://www.carehart.org/blog/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Ross Sent: Tuesday, October 17, 2006 1:50 PM To: discussion@acfug.org Subject: Re: RE: RE: [ACFUG Discuss] cf 7 bug? Yeah the point was that they didn't want to restart the server. I found this article regarding how MM (I mean Adobe) handles deployment of new code into their cluster and it gives a good tip on speeding up some of the initial compilation: (sorry dont have the url) Given both Simon's and Bob's comments, I got curious as to how our web team manages deployments to the Adobe website. Vijay Shah, who used to work on the CF engineering team, manages the group here. This is what he had to say: The Adobe site is run on a cluster of servers, all of which have the trusted cache switch turned on. Every time a new version of the site is to be deployed, the servers are brought down one at a time, the new set of precompiled templates pushed in, and then restarted. Note that the web team pushes out precompiled templates to the production servers. This is another technique that you could adopt if you want to save the one-time cost of compilation in production environments. This is especially important for servers that function under high loads - when a server is restarted and brought back into the cluster it will brought under load very suddenly. The cost of simultaneously having to compile a large number of different templates due to sudden load could bring a server to its knees! In case you're wondering how to precompile templates, see the documentation for cfcompile here. On 10/17/06, Charlie Arehart [EMAIL PROTECTED] wrote: Ok, yes, that is clearing the cache. (There is also an available API call to turn the trusted cache on and off, which would be different.) Indeed, the name of this method is a misnomer: it doesn't clear the trusted cache but instead just clears the template cache. The trusted option simply controls whether CF should look for newly updated files before loading them if it already has them in the cache. All that said, what's the problem you're experiencing? Is it that you change CFCs and reload, but don't see them? That may instead be caused by problems in the underlying Java class files. If you want to confirm it, turn off the save class files option in the Admin, and restart CF (to be safe), then request your file. Now, that alone may cause it to pick up the changed files, but you want to go a step further and change the CFC again and reload it, and
RE: [ACFUG Discuss] Re: PLZ DISREGARD PREV MAIL..1.Query Caching 2.Implementing search Feature
Ajas, you will get it to execute only once if you use CACHEDWITHIN and the SQL statement is the same. If you subsequently use the StartRow/MaxRows attributes in the CFOUTPUT QUERY loop, you'll still benefit from the previously cached result on subsequent next/prev pages. I do this in the code I have for the UGTV list/search interface. /charlie http://www.carehart.org/blog/ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ajas MohammedSent: Monday, October 16, 2006 3:20 PMTo: discussion@acfug.orgSubject: Re: [ACFUG Discuss] Re: PLZ DISREGARD PREV MAIL..1.Query Caching 2.Implementing search Feature Hi Charlie/Teddy, Thanks for the replies. I was in a meeting and just got chance to go thru your mail. you could store it in a session variable and use some indicator on the query string to tell the next/previous page that you mean to use the subset of dataI am thinking on this suggestion but wondering how I could access the results from the query EXECUTING IT ONLY ONCE i.e. next time I refer to that page it should a)execute query again but just give data from when I had left off i.e. if 1st page was 1-15 then second request should give 16-30 instead of running query again.b)do not execute query and I should be able display records from prev query only even though I will refer to that page by hyperlink next previous etc. By the way, I am using client variable to store the search word. Here you gocfif IsDefined ("txtKeyword") cfset client.txtKeyword = txtKeyword/cfifSo next time when query is run, it will know what was the search keyword and run the querywhich brings us to another question... the query is going be the same for lets say N requests, but still I could see from the response time that its getting executing on every request... If I have confused anyone then please let me know and I will email in more detail.Thanks.Ajas. On 10/16/06, Teddy Payne [EMAIL PROTECTED] wrote: Query caching is one solution to alleviate the speed of the query execution. There is the need to search page by page by a certain amount of records. In an ad hoc solution, I have seen a second query that would perform a query on the original source based upon a start point. The cfouput will typically have a maxrows based upon the query of a query. For the search criteria form, storing the criteria in a shared scope other always helps. The goal would not to change the originating query in any way otherwise the cache will be reset for a different combination. The search criteria would need to exists in the query of the query. Non-adhoc solutions include stored procedures that have increased amounts of complexity to perform conditional queries that can be either dynamically written or programatically built queries.Object Realtional Mappers like Reactor for ColdFusion have a build in pagination scheme that makes that sort of nice. I have not tested Reactor recently for the notation, but I saw the object set for it. Teddy On 10/16/06, Charlie Arehart [EMAIL PROTECTED] wrote: Are folks reading my note below? Ajas, please clarify if I have understood your need correctly. I had just gone through the same dilemma on my UGTV site. I had done a similar next/prev link, but if the user had entered search criteria, I was challenged because I needed to carry that search criteria to the next screen. So this was about more than just simple query caching but indeed about carrying the search criteria (from a form value obtained on the first result page) to subsequent next/previous pages. If this isn't the challenge you're trying to solve as well, my apologies. But if it is, I hope folks will see that there's more to it than just the general issues of query caching. /charlie http://www.carehart.org/blog/ From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On Behalf Of Charlie ArehartSent: Monday, October 16, 2006 11:13 AMTo: discussion@acfug.orgSubject: RE: [ACFUG Discuss] Re: PLZ DISREGARD PREV MAIL..1.Query Caching 2.Implementing search Feature Ajas, I think you confused people with the subject saying "please disregard previous email". As for your challenge, your challenge isn't with caching but simplythat you needthe "next" or "previous" pages to know that you are still workingonthe subset of searched data. Youhave a couple of choices. You could pass your search criteria from page to page in the query string, or you could store it in a session variable and use some indicator on the query string to tell the next/previous page that you mean to use the subset of data (which will then pull the search criteria from the session to run that in its SQL). At that point, yes, you may want to use a cached result. Since the cache is per the SQL
Re: RE: RE: RE: RE: [ACFUG Discuss] cf 7 bug?
Thanks for the info, I think it is an environment issue... as it is working as expected on my local box and from another's windows workstation. I'll check the path variable to see if that can help me out. On 10/17/06, Charlie Arehart [EMAIL PROTECTED] wrote: You ask: I thought by what you said that the clearing of the trusted cache will only remove the cfm files and not the cfc's? Well, I don't think imply any difference in the handling of CFCs vs CFM files regarding the trusted cache, but if that's how you read it, no there's no difference. That said, though it's certainly true that if the CFCs instances are stored in shared variable scopes (session, application), then that would explain them not being picked up. Here's another possibility: the CFC may be being picked up from somewhere other than where you expect. Recall that CFCs are called using an order of searching which (I think) is the local directory, the web root, any mapped (CF Admin mappings) directories, the customtags directory, and any added custom tags directories. If it finds one earlier in that search order, that would keep it seeing the one you may be changing. Just a thought. Check the path variable returned in the structure when you call getmetadata() against the CFC instance, to know for sure. /charlie http://www.carehart.org/blog/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Ross Sent: Tuesday, October 17, 2006 4:23 PM To: discussion@acfug.org Subject: Re: RE: RE: RE: [ACFUG Discuss] cf 7 bug? Ok I gotcha, thanks Charlie. I'm not sure why this is happening to them. I can ask about a SVN issue but, I don't think that is what is going on. My original question was concerning code not showing up on an existing server after they use the admin api to clear the trusted cache. Ie: they put new code into prod, clear the cache and only the cfm files are reloaded not the cfc's. A co-worker tested this on his windows box and therein might lie the problem. This site is running on Solaris in production. I thought by what you said that the clearing of the trusted cache will only remove the cfm files and not the cfc's? I will ask about the class files being saved. This isn't something they can really fiddle with in production since the 9 machine cluster is serving some serious traffic. -Steven - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com - -- Steven Ross web application interface developer http://www.zerium.com [mobile] 404-488-4364 [fax] 928-484-4364 - To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -