logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: mod_env "no-cache" disables all caching
Author
GadiK



Joined: 14 Jul 2010
Posts: 14

PostPosted: Thu 28 Oct '10 18:10    Post subject: mod_env "no-cache" disables all caching Reply with quote

Hi All,
I'm trying to disable caching for a specific url.

In httpd.conf I have configured
Code:
CacheEnable /init/modules/

so that whenever someone requests a file from that folder it will be cached.

I am having a problem with disabling caching for "/init/modules/" specifically (meaning that "/init/modules/fileName" should cache").

The following will cancel caching of all that folder:
Code:
"CacheDisable /init/modules"


I am trying to use
Code:
"SetEnv no-cache /init/modules/"

but that cancels caching altogether for all folders. (I also tried wrapping the uri with double quotes. i.e. "/init/modules/" - didn't help).

The only thing that worked was:
Code:
SetEnvIf THE-REQUEST "GET /init/modules/ HTTP/1.1" no-cache=/init/modules/


This solution is to risky for me and I believe that using
Code:
"SetEnv no-cache /init/modules/"

should work.

Where am I wrong?

Thank you,
Gadi
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 02 Nov '10 15:22    Post subject: Reply with quote

what is in /init/modules that shall be not be cached, if /init/modules/fileName shall be cached?

CacheDisable url-string
The CacheDisable directive instructs mod_cache to not cache urls at or below url-string.
Back to top
GadiK



Joined: 14 Jul 2010
Posts: 14

PostPosted: Wed 03 Nov '10 13:23    Post subject: Reply with quote

There's only one file there. It is cached whether we access it trough
Code:
/init/modules/

or
Code:
/init/modules/fileName


The thing is that if I use
Code:
/init/modules/

the file is cached and all other attempts of accessing the file with
Code:
/init/modules/fileName

result in getting the cached file. Even if the original file had changed.

So I would like to allow access to
Code:
/init/modules/

because it happens once at the beginning of each session, but to disable caching of this url.

Thanks.
Back to top


Reply to topic   Topic: mod_env "no-cache" disables all caching View previous topic :: View next topic
Post new topic   Forum Index -> Apache