Search Results

Search found 25 results on 1 pages for 'jarrod'.

Page 1/1 | 1 

  • How to get rid of the following multiple alternatives warnings in my ANTLR3 grammar?

    - by Jarrod Roberson
    [11:45:19] warning(200): mygrammar.g:14:57: Decision can match input such as "','" using multiple alternatives: 1, 2 As a result, alternative(s) 2 were disabled for that input [11:45:19] warning(200): C:\Users\Jarrod Roberson\mygrammar.g:14:57: Decision can match input such as "','" using multiple alternatives: 1, 2 As a result, alternative(s) 2 were disabled for that input I want to be able to nest functions inside other functions. myfunction(x) -> sqr(a) -> a * a, y = sqr(x). here is the line it is complaining about function : ID '(' args ')' '->' statement (',' statement)* ; and here is what it is considering the alternative statement : ATOM | expression | assignment | function ; Here is what the synatx diagram looks like in ANTLRWorks I really like things to compile/work without any warnings. How do I resolve this warning condition?

    Read the article

  • Why are we as an industry not more technically critical of our peers? [closed]

    - by Jarrod Roberson
    For example: I still see people in 2011 writing blog posts and tutorials that promote setting the Java CLASSPATH at the OS environment level. I see people writing C and C++ tutorials dated 2009 and newer and the first lines of code are void main(). These are examples, I am not looking for specific answers to the above questions, but to why the culture of accepting sub-par knowledge in the industry is so rampant. I see people posting these same type of empirically wrong suggestions as answers on www.stackoverflow.com and they get lots of up votes and practically no down votes! The ones that get lots of down votes are usually from answering a question that wasn't asked because of lack of reading for comprehension skills, and not incorrect answers per se. Is our industry that ignorant as a whole, I can understand the internet in general being lazy, apathetic and un-informed but our industry should be more on top of things like this and way more critical of people that are promoting bad habits and out-dated techniques and information. If we are really an engineering discipline, why aren't people held to a higher standard as they are in other engineering disciplines? I want to know why people accept bad advice, poor practices as the norm and are not more critical of their peers in the software industry.?

    Read the article

  • Help parsing long (3.5mil lines) text file, line by line and storing data, need a strategy

    - by Jarrod
    This is a question about solving a particular problem I am struggling with, I am parsing a long list of text data, line by line for a business app in PHP (cron script on the CLI). The file follows the format: HD: Some text here {text here too} DC: A description here DC: the description continues here DC: and it ends here. DT: 2012-08-01 HD: Next header here {supplemental text} ... this repeats over and over for a few hundred megs I have to read each line, parse out the HD: line and grab the text on this line. I then compare this text against data stored in a database. When a match is found, I want to then record the following DC: lines that succeed the matched HD:. Pseudo code: while ( the_file_pointer_isnt_end_of_file) { line = getCurrentLineFromFile title = parseTitleFrom(line) matched = searchForMatchInDB(line) if ( matched ) { recordTheDCLines // <- Best way to do this? } } My problem is that because I am reading line by line, what is the best way to trigger the script to start saving DC lines, and then when they are finished save them to the database? I have a vague idea, but have yet to properly implement it. I would love to hear the communities ideas\suggestions! Thank you.

    Read the article

  • Downloading image from Picasa Web Albums loses metadata

    - by Jarrod
    I have several photos on my Picasa Web Albums account. I have added captions, tags and location information to many of them through the PWA web interface. I assumed that PWA was saving this information in an IPTC, or some other metadata tag inside the image, but whenever I go to 'Download Photo' (on a single image), the resulting image, when saved to my computer, has no tags whatsoever. Does anybody know why this is the case? Does PWA require Picasa to be installed to preserve this information?

    Read the article

  • How to get IIS7 to release a locked file?

    - by Jarrod Dixon
    During our production builds, a very large (10 megabyte) static content file in the root directory will sometimes be locked by IIS and cannot be deleted by the clean task. This is presumably because it is being actively served to one or more clients at the time. The build process stops the website before cleaning via c:\Windows\System32\inetsrv\appcmd.exe stop site http://oursite.com However, this does not release the file - we have to restart IIS to get the process to relinquish its lock. appcmd.exe allows you to take IIS down completely; we do not want to do this! Are there any other ways to get IIS to let go of a locked file, without restarting IIS? Simply stopping and starting the individual website is definitely not working to release the file lock.

    Read the article

  • Excel document opens in IE 64, not in IE 32

    - by Jarrod
    Whenever I click on a hyperlink to a scrip that outputs an Excel 8 document, I get a prompt from IE to open the file or save-as. If I click open in IE 32 bit, the document opens in Excel (which is what I want). If I click open in the 64 bit version of IE, the document opens in the browser. How can I make both versions of IE open in Excel? I am using IE8 on Windows 7 64 bit.

    Read the article

  • Freebsd Secondary Group not allowing folder deletion

    - by Jarrod Juleff
    TLDR: I have a user that is a member to a group as a secondary group. This user can delete files with 664 perms as a secondary user, but not directories with perms of 775. Details: I have a user. Lets call him ftpuser. I use him to upload and download files to my devbox. The user's primary group is "ftp" and is also in the group "www" as a secondary group. My web server runs as user www and group www, and I have proftpd (running as www and www) configured to drop all files into the needed directories as www and www (for file ownership) and perms 664 on files and 775 on directories. My problem is (tried with 2 ftp clients) the ftp client can delete the files, but not the folders. Filezilla returns 550 permission denied. The owner only can delete flag is not set, and I've triple checked the permissions and they are indeed 775. Its driving me nuts to have to log into my server to manually delete folders every time. Some of the folders and files are created by 1 of my php scripts, but the permissions are getting set properly when I check the files' properties. Directory and file creation works phenomenal. Can delete files, just not directories. Freebsd 9.0 Running in VirtualBox (32bit all the way around) Proftpd (running as www and www) as ftp server (tried using both dreamweaver and filezilla as the clients) Basic amp setup (apache,mysql,and php).

    Read the article

  • How to symlink folders and exclude certain files

    - by Jarrod White
    Hey Guys, I'm not a server guru (unfortunately) but have a decent knowledge of linux & bsd. I'm trying to symlink multiple instances of HLDS (game server) but need to exclude certain folders & config files to achieve this properly. I need to do it this way as HLDS loads many mods automatically, and putting an exception to disable the mods doesnt work for all of them. so basically i want: /home/user/hlds-install (the base install) /home/user/server1 /home/user/server2 etc... and then be able to manually put any configs/mods ive excluded into the server dir's so that each server can be configured individually. Can anyone tell me how to do this, perhaps some sort of bash script so that I can just change the targets to run it each time i want to create a new one. I have quite a number to make so doing the whole thing manually for each one definately isn't an option and im all for working smarter, not harder! Thanks :)

    Read the article

  • Virtual box - How to add disks and move var, opt and home to them?

    - by Jarrod Roberson
    I created a CentOS 5.6 Guest OS Virtual Machine. I made the first disk 10GB, I am rapidly outgrowing it. It was suggested that I make disks for my /var, /opt and /home directories and move them so I can better manage the disks for backing up and what not. This sounds like a good idea. I know how to create the disks in Virtual Box. I have dug around Google and the internet in general and all my attempts at doing this have failed. Snapshots are awesome! I can get the drives fdisked, and I have had limited success mounting them to /mnt/var, /mnt/home and /mnt/opt, but even in single user mode ( init 1 ) I can't get the entire contents of the directories to move over, and then the machine won't reboot correctly. cd /var cp * -ax /mnt/var The /var directory in particular is not wanting to move everything to the new location. How do I format, mount and move the /var, /opt and /home to my new disks?

    Read the article

  • Spring Security RememberMe Services with Session Cookie

    - by Jarrod
    I am using Spring Security's RememberMe Services to keep a user authenticated. I would like to find a simple way to have the RememberMe cookie set as a session cookie rather than with a fixed expiration time. For my application, the cookie should persist until the user closes the browser. Any suggestions on how to best implement this? Any concerns on this being a potential security problem? The primary reason for doing so is that with a cookie-based token, any of the servers behind our load balancer can service a protected request without relying on the user's Authentication to be stored in an HttpSession. In fact, I have explicitly told Spring Security to never create sessions using the namespace. Further, we are using Amazon's Elastic Load Balancing, and so sticky sessions are not supported. NB: Although I am aware that as of Apr. 08, Amazon now supports sticky sessions, I still do not want to use them for a handful of other reasons. Namely that the untimely demise of one server would still cause the loss of sessions for all users associated with it. http://aws.amazon.com/about-aws/whats-new/2010/04/08/support-for-session-stickiness-in-elastic-load-balancing/

    Read the article

  • Android orientation change causes ImageView to dissapear

    - by Jarrod Smith
    Below is my layout for the row template in a SimpleCursorAdapter. The ImageView with id next_arrow disappears on orientation change. If I replace @drawable/arrow with @drawable/icon (copy of the standard sym_def_app_icon) it works fine. I thought it might be somehow related to the icons being of different dimensions, but I resized @drawable/icon to be the exact same dimensions as the arrow and it still worked fine while the arrow didn't. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="90dp" android:background="@drawable/product_list_divider" android:paddingTop="10dp"> <ImageView android:src="@drawable/ninja_20_65" android:id="@+id/category_icon" android:layout_marginLeft="20dp" android:layout_marginRight="20dp" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_marginTop="3dp"/> <LinearLayout android:orientation="vertical" android:layout_weight="5" android:layout_width="0dp" android:layout_height="wrap_content"> <TextView android:id="@+id/category_name" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Name" style="@style/CategoryHeading" android:layout_marginTop="5dp"/> <TextView android:id="@+id/category_description" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Description" style="@style/CategoryDescription"/> </LinearLayout> <ImageView android:src="@drawable/arrow" android:layout_weight="1" android:layout_width="0dp" android:layout_marginRight="10dp" android:layout_height="wrap_content" android:layout_marginTop="20dp" android:id="@+id/next_arrow"/> </LinearLayout>

    Read the article

  • Running msiexec from a service (Local System account)

    - by Jarrod
    We are working on an update system for our software. The updater should in the background as a service, and when an update is available, downloads and installs it. We need the service to install the update since the msi requires elevation to run, but some of our clients will be restricted users. The MSI is a WIX MSI and does a Major Upgrade when run. The problem is, the update does not seem to work when ran from our service. I can see msiexec run, and it returns successfully, but seems to make no changes to the system. The same command, when run from my user account works as expected. Is there some caveat to running msiexec from a Local System service? We are simply doing: System.Diagnostics.Process.Start("msiexec.exe", arguments);

    Read the article

  • Methods of providing custom reports for an asp.net application

    - by Jarrod
    In our windows application, we used crystal reports. If a customer needed a custom report, we could create it and then send them the rpt file. The customer would then simply add the report file to a custom folder, and could access it directly from our application. Using a web app, how is this possible. It seems like anything created, using ssrs, crystal, or even telerik reporting must be embedded. What are some methods for providing custom reports to users of an asp.net web application?

    Read the article

  • HttpWebRequest does has empty response requesting a search from Bing

    - by Jarrod Maxwell
    I have the following code that sends a HttpWebRequest to Bing. When I request the url below though it returns what appears to be an empty response when it should be returning a list of results. var response = string.Empty; var httpWebRequest = WebRequest.Create("http://www.bing.com/search?q=stackoverflow&count=100") as HttpWebRequest; httpWebRequest.Method = WebRequestMethods.Http.Get; httpWebRequest.Headers.Add("Accept-Language", "en-US"); httpWebRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Win32)"; httpWebRequest.Headers.Add(HttpRequestHeader.AcceptEncoding, "gzip,deflate"); using (var httpWebResponse = httpWebRequest.GetResponse() as HttpWebResponse) { Stream stream = null; using (stream = httpWebResponse.GetResponseStream()) { if (httpWebResponse.ContentEncoding.ToLower().Contains("gzip")) stream = new GZipStream(stream, CompressionMode.Decompress); else if (httpWebResponse.ContentEncoding.ToLower().Contains("deflate")) stream = new DeflateStream(stream, CompressionMode.Decompress); var streamReader = new StreamReader(stream, Encoding.UTF8); response = streamReader.ReadToEnd(); } } Its pretty standard code for requesting and receiving a web page. Any ideas why the response is empty? Thanks in advance. EDIT I left off a query string parameter in the url. I also had &count=100 which I have now corrected. It seems to work for values of 50 and below but returns nothing when larger. This works ok when in the browser, but not for this web request. It makes me think the issue is that the response is large and HttpWebResponse is not handling that for me the way I have it set up. Just a guess though.

    Read the article

  • WIX/DTF - How do I elevate deffered managed custom actions?

    - by Jarrod
    We are working on creating an installer using WIX. We have a couple of custom actions that are going to require elevation to run on Vista. Our MSI obviously elevates itself, because I get a UAC prompt and it writes keys to HKLM. Our managed DTF custom actions are apparently not running elevated. If I start the MSI from an elevated command prompt, the installation runs fine. The only workaround I have seen suggested (link) is to use another exe with a manifest as a bootstrapper to run the MSI. This is not a good solution, as it doesn't allow the user to modify the installation by selecting "Change" from the Add/Remove programs dialog. Our install has multiple features that can be customized, so we want this functionality. Does anybody know how to do this?

    Read the article

  • How can I use Spring Security without sessions?

    - by Jarrod
    I am building a web application with Spring Security that will live on Amazon EC2 and use Amazon's Elastic Load Balancers. Unfortunately, ELB does not support sticky sessions, so I need to ensure my application works properly without sessions. So far, I have setup RememberMeServices to assign a token via a cookie, and this works fine, but I want the cookie to expire with the browser session (e.g. when the browser closes). I have to imagine I'm not the first one to want to use Spring Security without sessions... any suggestions?

    Read the article

  • PrinterSettings.IsValid always returning false

    - by Jarrod
    In our code, we have to give the users a list of printers to choose from. The user then chooses a printer and it is checked to verify it is valid before printing. On a windows 2003 server with IIS 6, this works fine. On a windows 2008 server with IIS 7, it fails each time impersonate is set to true. PrinterSettings printerSetting = new PrinterSettings(); printerSetting.PrinterName = ddlPrinterName.SelectedItem.Text; if (!printerSetting.IsValid) { lblMsg.Text = "Server Printer is not valid."; } else { lblMsg.Text = "Success"; } Each time this code is run, the "Server Printer is not valid" displays, only if impersonate is set to true. If impersonate is set to false, the success message is displayed. The impersonation user has full rights to the printer. Is there a way to catch the actual reason the printer is not valid? Is there some other 2008 setting I should check?

    Read the article

  • Intellij Idea 13.x and ASM 5.x library incompatible?

    - by Jarrod Roberson
    I can't get Intellij Idea 13.0 to compile my code against ASM 5.0.3 I have a multi-module Maven project. It compiles and installs successfully. Apparently com.google.findbugs:findbugs has a dependency on asm:asm:3.3 and I want to use org.ow2.asm:asm:5.0.3 to manipulate some bytecode. So in the parent pom.xml I exclude the asm:asm:3.3 dependencies from the classpath. This works fine when I run mvn install from the command line. I can't get the Build - Make Project menu selection to work in Intellij Idea. Here is the relevant parts of my pom.xml files. parent.pom <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm</artifactId> <version>5.0.3</version> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-tree</artifactId> <version>5.0.3</version> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-util</artifactId> <version>5.0.3</version> </dependency> <dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm-commons</artifactId> <version>5.0.3</version> </dependency> <dependency> <groupId>com.google.code.findbugs</groupId> <artifactId>findbugs</artifactId> <version>2.0.3</version> <exclusions> <exclusion> <groupId>asm</groupId> <artifactId>asm</artifactId> </exclusion> <exclusion> <groupId>asm</groupId> <artifactId>asm-commons</artifactId> </exclusion> <exclusion> <groupId>asm</groupId> <artifactId>asm-tree</artifactId> </exclusion> </exclusions> </dependency> Here is the code that is failing 18 public static void main(final String[] args) throws IOException 19 { 20 final InputStream is = NotEmptyTest.class.getResourceAsStream("/com/vertigrated/annotation/NotEmptyTest.class"); 21 final ClassReader cr = new ClassReader(is); 22 final ClassNode cn = new ClassNode(); 23 cr.accept(cn, 0); 24 for (final MethodNode mn : cn.methods) 25 { 26 - 38 snipped for brevity 39 } 40 } 41 } Here is the error message: Information:Using javac 1.7.0_25 to compile java sources Information:java: Errors occurred while compiling module 'tests' Information:Compilation completed with 1 error and 2 warnings in 2 sec Information:1 error Information:2 warnings /<path to my source code>/NotEmptyTest.java Error:Error:line (24)java: incompatible types required: org.objectweb.asm.tree.MethodNode found: java.lang.Object Warning:Warning:java: /<path to my project>//NotEmptyTest.java uses unchecked or unsafe operations. Warning:Warning:java: Recompile with -Xlint:unchecked for details. As you can see in the screen capture, it reports the correct version of the libraries in the Javadoc but the AutoComplete shows the old 3.3 non-typesafe return value of List instead of List<MethodNode>: Here is what Maven knows, which is correct: [INFO] --- maven-dependency-plugin:2.8:list (default-cli) @ tests --- [INFO] [INFO] The following files have been resolved: [INFO] com.google.code.findbugs:bcel:jar:2.0.1:compile [INFO] junit:junit:jar:4.11:test [INFO] xml-apis:xml-apis:jar:1.0.b2:compile [INFO] com.apple:AppleJavaExtensions:jar:1.4:compile [INFO] javax.inject:javax.inject:jar:1:compile [INFO] jaxen:jaxen:jar:1.1.6:compile [INFO] org.ow2.asm:asm-util:jar:5.0.3:compile [INFO] com.google.inject:guice:jar:3.0:compile [INFO] dom4j:dom4j:jar:1.6.1:compile [INFO] com.google.code.findbugs:jFormatString:jar:2.0.1:compile [INFO] net.jcip:jcip-annotations:jar:1.0:compile [INFO] org.ow2.asm:asm-tree:jar:5.0.3:compile [INFO] commons-lang:commons-lang:jar:2.6:compile [INFO] com.google.code.findbugs:jsr305:jar:2.0.1:compile [INFO] org.hamcrest:hamcrest-core:jar:1.3:test [INFO] aopalliance:aopalliance:jar:1.0:compile [INFO] com.google.code.findbugs:findbugs:jar:2.0.3:compile [INFO] org.ow2.asm:asm-commons:jar:5.0.3:compile [INFO] org.ow2.asm:asm:jar:5.0.3:compile How do I get Intellij Idea to use the correct dependency internally?

    Read the article

  • MySql UDF using shared library won't load

    - by Jarrod
    I am attempting to create a mysql UDF which will match a fingerprint using Digital Persona's free linux SDK library. I have written a trivial UDF as a learning experience which worked fine. However, when I added a dependency to Digital Persona's shared object I can no longer get MySql to load my UDF. I added includes to DP's headers and compiled my UDF using: gcc -fPIC -Wall -I/usr/src/mysql-5.0.45-linux-i686-icc-glibc23/include -shared -o dp_udf.so dp_udf.cc I also tried adding the -static argument, but whenever I restart MySql, I get the error: Can't open shared library 'dp_udf.so' (errno: 0 /usr/local/mysql/lib/plugin/dp_udf.so: undefined symbol: MC_verifyFeaturesEx) MC_verifyFeaturesEx is a function defined "dpMatch.h" which I included, and is implemented in libdpfpapi.so which I have tried placing in the same location as my dp_udf.so and in /usr/lib. Am I doing something wrong with my call to gcc (my C++ skills are rusty) or does MySql not allow UDFs to use additional shared objects?

    Read the article

  • Generating Component SEF URLs in Joomla

    - by Jarrod
    I have a custom Joomla component and a router for building my SEF URL's for use within the site, and everything is usually shiny - internally, all of my links look and act fantastic. I recently route a controller action that sends a list of links through email, and I've noticed that my URLs are coming out.... funky - hopefully someone can tell me why. Usually, my router generates an internal link that looks like this: http://localhost/Registry/calendar/265889635/Some-Long-Boring-Event However, when I send an email and preparing the same URL through the same router I get: http://localhost/Registry/Registry/component/calendar/569555803/Some-Long-Boring-Event Has anybody run into this issue before?

    Read the article

  • Strategies for Error Handling in .NET Web Services

    - by Jarrod
    I have a fairly substantial library of web services built in .NET that I use as a data model for our company web sites. In most .NET applications I use the Global ASAX file for profiling, logging, and creating bug reports for all exceptions thrown by the application. Global ASAX isn't available for web services so I'm curious as to what other strategies people have come up with to work around this limitation. Currently I just do something along these lines: <WebMethod()> _ Public Function MyServiceMethod(ByVal code As Integer) As String Try Return processCode(code) Catch ex As Exception CustomExHandler(ex) 'call a custom function every time to log exceptions Return errorObject End Try End Function Anybody have a better way of doing things besides calling a function inside the Catch?

    Read the article

  • mySQL Left Join on multiple tables with conditions

    - by Jarrod
    Hi, I have a problem. I have 4 tables: Invoice_Payment, Invoice, Client, and Calendar Basically, I have the below query, which works well, except, months with no date_due don't return. I.E only months with a date_due will be returned. I think I have to use a left join and join the calendar table with something like: LEFT JOIN Calendar ON Invoice_Payments.date_paid = Calendar.date_field. But I'm having no luck SELECT MONTHNAME(Invoice_Payments.date_paid) as month, SUM(Invoice_Payments.paid_amount) AS total FROM Invoice, Client, Invoice_Payments WHERE Client.registered_id = 1 AND Client.id = Invoice.client_id And Invoice.id = Invoice_Payments.invoice_id AND date_paid IS NOT NULL GROUP BY YEAR(Invoice_Payments.date_paid), MONTH(Invoice_Payments.date_paid) Any help appreciated.

    Read the article

  • mySQL Left Join on multiple tables

    - by Jarrod
    Hi I'm really struggling with this query. I have 4 tables (http://oberto.co.nz/db-sql.png): Invoice_Payement, Invoice, Client and Calendar. I'm trying to create a report by summing up the 'paid_amount' col, in Invoice_Payment, by month/year. The query needs to include all months, even those with no data There query needs the condition (Invoice table): registered_id = [id] I have tried with the below query, which works, but falls short when 'paid_date' does not have any records for a month. The outcome is that month does not show in the results I added a Calendar table to resolved this but not sure how to left join to it. SELECT MONTHNAME(Invoice_Payments.date_paid) as month, SUM(Invoice_Payments.paid_amount) AS total FROM Invoice, Client, Invoice_Payments WHERE Client.registered_id = 1 AND Client.id = Invoice.client_id And Invoice.id = Invoice_Payments.invoice_id AND date_paid IS NOT NULL GROUP BY YEAR(Invoice_Payments.date_paid), MONTH(Invoice_Payments.date_paid) Please see the above link for a basic ERD diagram of my scenario. Thanks for reading. I've posted this Q before but I think I worded it badly.

    Read the article

  • Can a MAC address be used as a reliable part of a rights management (DRM) scheme?

    - by Jarrod Mosen
    We're currently writing some software that we want to protect. We thought that registering a user's MAC address in a database upon activation of the software seemed viable; we can profile and grab that with a Java applet, (is there a better way?) so getting it isn't too much of a problem. However, we want their computer to only run the application, and download application files/updates from the server when their MAC address has been verified with their one on-file. We understand that this means a lockdown to one computer, but special changes can be made on request. What would be the best way to verify their MAC address, to see if it exists in the database, and then serve them the files to run the application? (And to simply run it on subsequent requests, to prevent re-downloading.)

    Read the article

  • Implementing Model-level caching

    - by Byron
    I was posting some comments in a related question about MVC caching and some questions about actual implementation came up. How does one implement a Model-level cache that works transparently without the developer needing to manually cache, yet still remains efficient? I would keep my caching responsibilities firmly within the model. It is none of the controller's or view's business where the model is getting data. All they care about is that when data is requested, data is provided - this is how the MVC paradigm is supposed to work. (Source: Post by Jarrod) The reason I am skeptical is because caching should usually not be done unless there is a real need, and shouldn't be done for things like search results. So somehow the Model itself has to know whether or not the SELECT statement being issued to it worthy of being cached. Wouldn't the Model have to be astronomically smart, and/or store statistics of what is being most often queried over a long period of time in order to accurately make a decision? And wouldn't the overhead of all this make the caching useless anyway? Also, how would you uniquely identify a query from another query (or more accurately, a resultset from another resultset)? What about if you're using prepared statements, with only the parameters changing according to user input? Another poster said this: I would suggest using the md5 hash of your query combined with a serialized version of your input arguments. This would require twice the number of serialization options. I was under the impression that serialization was quite expensive, and for large inputs this might be even worse than just re-querying. And is the minuscule chance of collision worth worrying about? Conceptually, caching in the Model seems like a good idea to me, but it seems in practicality the developer should have direct control over caching and write it into the controller. Thoughts/ideas? Edit: I'm using PHP and MySQL if that helps to narrow your focus.

    Read the article

1