aroc725 has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to get a single-script Web application that apparently worked fine under perl version 5.8.8 but not under version 5.8.9 working again. The application runs under IIS.

The application allows the user to perform a search against multiple schemas in an Oracle database and then presents the search results. While I'm able to perform searches without problems at the start of the day, as time goes on, I start get results for previous searches returned back to me.

The original developer's approach to handling presentation was to use his own version of template files, which he proceeds to read into a variable and then performs a number of substitutions of 'tags' within the string contents with other variable values. The updated string is then returned by the script.

Complicating things further is the use of a module which uses PerlEx::DBI. But I've temporarily modified the script to not use that module for database access. Instead, the script uses DBI directly.

Any ideas as to how to resolve this problem of getting previous search results returned would be greatly appreciated.

Replies are listed 'Best First'.
Re: Search results being cached?
by chrestomanci (Priest) on Dec 11, 2010 at 09:10 UTC

    If your predecessor wrote his own templating system, then it is likely that he also wrote a results caching system, and that system has bugs in it.

    I would say you have some detective work ahead of you to find that caching system, and either fix the bugs so that cached results expire more quickly, or rip it out and replace it with a standard library from CPAN.

    I would start by greping the filesystem for old cached pages, that should not be valid any more. Once you find them, you can then grep the perl source tree for references to those files.

    I don't think the back end database, or the database access library you are using has anything to do with your problem.

Re: Search results being cached?
by TomDLux (Vicar) on Dec 11, 2010 at 02:56 UTC

    There is a way to mark a page the server sends out as dynamic, that it shouldn't be cached. The details excape me at the moment, but in any case it's an HTML question rather than a perl question. Google is your friend, I would go for a w3-schools page, personally, if there is one for the topic.

    As Occam said: Entia non sunt multiplicanda praeter necessitatem.

Re: Search results being cached?
by aroc725 (Acolyte) on Jan 24, 2011 at 07:39 UTC
    Turns out the value of a scalar variable, containing the list of selected collections/data-sets, was being persisted between script invocations.