1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

disable cache on apache

Discussion in 'Plesk for Linux - 8.x and Older' started by netdiver, Jan 3, 2006.

  1. netdiver

    netdiver New Pleskian

    22
    23%
    Joined:
    Jan 3, 2006
    Messages:
    8
    Likes Received:
    0
    Hi folks.

    Here is my problem:
    (Linux 9.3 - Plesk 7.5 - apache 2)

    I'm developing Perl scripts and currently I have a very fascinating issue.
    When I'm calling my scripts with different parameters first (...com/bla.pl?u=user&rand=4711) and afterwards calling the same script a couple of times with only one parameters ...com/bla.pl?u=user) my random values from previous calls show up again from time to time.

    Ok, I disabled Caching in my browsers (tried IE & Firefox) and also used the META Tags in html output of scripts to prevent caching, but it seems that Apache itself caches some answers.
    Has anybody any idea where I could disable this glorious feature?
    Btw. there are no hints in the log files .. the scripts work fine .. (I also tried it with lynx on the local mashine .. same effect.)

    In the documentation I only found some features on enabling caching, but nothing about disabling it completely - or at least for one domain ?!?

    Anybody any ideas?

    All the best,

    NetDiver
     
  2. netdiver

    netdiver New Pleskian

    22
    23%
    Joined:
    Jan 3, 2006
    Messages:
    8
    Likes Received:
    0
    Ok, .. I found the problem:
    An unitialized hash table.

    You can try it by yourself.
    Just push some url parameters to an uninitialized hash table and print out every key / value as result of the cgi script.
    If you reduce the number of parameters you'l still find the old values in your hash table.

    Bugfix:
    Intialize the Hash Table first.
    %bla = ( );

    Ahhhrggg ... I'm coding C/C++ for quiet a lot time and this is always the first thing I take a look at, when things go wrong. But in Perl ?!?! - Well well ...

    Clean code is something wonderful !

    So far ..

    NetDiver
     
  3. gddotts

    gddotts Guest

    0
     
    Netdiver,

    Thanks for posting the solution to your problem. We have a set of scripts on our server that have worked flawlessly for years on other equipment. Once located on our new equipment we were experiencing the same randomness issues you were.

    Just want to say thanks :D for taking the time to post your solution. It saved us hours of research.

    GDotts
     
  4. netdiver

    netdiver New Pleskian

    22
    23%
    Joined:
    Jan 3, 2006
    Messages:
    8
    Likes Received:
    0
Loading...