You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Chris Peterson <cl...@alumni.caltech.edu> on 2009/02/03 01:34:48 UTC

[users@httpd] Can't figure out where data is being cached

I'm having an odd problem which I've had no luck tracking down. I don't even 
know for sure that it's an Apache issue, but I'm hoping somebody here has 
seen it before, or has some new ideas.

I'm running in a somewhat complicated development environment. I've got 
Ubuntu 8.04 running under VirtualBox on an XP SP3 machine. The Ubuntu 
installation includes Apache 2.2.8, PHP 5.2.4. The website under development 
operates out of a VirtualBox shared folder. So I'm editing the files on my 
XP machine, but they are being served from the Apache installation. Make 
sense?

Here's the problem. I can change any HTML or PHP files, and the change is 
immediately seen in the browser (either on the XP machine, or the Linux VM). 
But CSS files are being cached somewhere. The only way I can see a change is 
to change the file name every time I make a change. A big pain, obviously. 
The cached CSS pages persist for weeks at least. I haven't found an expiry 
time.

What I can't determine is where these pages are actually cached. It happens 
across different browsers, and clearing the browser cache doesn't help. I'm 
mainly using Firefox, and have the caching disabled using Web Developer. I 
don't have any caching mods enabled in Apache2, and can't find any cache 
folders on the Ubuntu machine. I don't have any proxies running. Even though 
the server and browser are running on the same machine, it looks like data 
might be going out on my LAN (disconnecting the network cable breaks the 
internal connection between XP and the VM). But my router doesn't seem to 
have any caching support, so I don't think that's the problem.

If anybody has any ideas who is caching my CSS files, I'd welcome some input 
here.

Chris

*****************************************
Chris L Peterson
Cloudbait Observatory
http://www.cloudbait.com



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Can't figure out where data is being cached

Posted by Chris Peterson <cl...@alumni.caltech.edu>.
Bingo! Apparently files were getting cached in memory because the document 
root was on a network share. Setting EnableMMAP and EnableSendfile both 
"off" fixed the issue. Thanks for the suggestion.

(All the files showed up correctly in the access log, even though the 
content of the files being accessed wasn't the same as the versions on the 
disk.)

Chris

*****************************************
Chris L Peterson
Cloudbait Observatory
http://www.cloudbait.com


----- Original Message ----- 
From: "Eric Covener" <co...@gmail.com>
To: <us...@httpd.apache.org>
Sent: Tuesday, February 03, 2009 8:28 AM
Subject: Re: [users@httpd] Re: Can't figure out where data is being cached


> On Tue, Feb 3, 2009 at 10:24 AM, Chris Peterson <cl...@alumni.caltech.edu> 
> wrote:
>
>> Does Apache ever cache anything, maybe just in memory, if the mod_cache
>> extension isn't enabled? Is there a mechanism for examining its memory
>> cache?
>
> It won't cache like that.  Do requests to these "cached" CSS files end
> up in your access log? Is there perhaps some intermediate cache
> misbehaving?
>
> Can you try EnableSendfile off or use mod_expires to set some short
> default expiration time?


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Can't figure out where data is being cached

Posted by Eric Covener <co...@gmail.com>.
On Tue, Feb 3, 2009 at 10:24 AM, Chris Peterson <cl...@alumni.caltech.edu> wrote:

> Does Apache ever cache anything, maybe just in memory, if the mod_cache
> extension isn't enabled? Is there a mechanism for examining its memory
> cache?

It won't cache like that.  Do requests to these "cached" CSS files end
up in your access log? Is there perhaps some intermediate cache
misbehaving?

Can you try EnableSendfile off or use mod_expires to set some short
default expiration time?

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Can't figure out where data is being cached

Posted by Chris Peterson <cl...@alumni.caltech.edu>.
Thanks. I had already tried this trick, with no success. I'm suspicious of 
everything, but I hope I've largely excluded the browser as the problem. 
With Firefox you can use about:cache to see just what's being kept, both on 
disk and in memory, and it does seem that the cache is empty. Also, the 
behavior is the same with Firefox, IE, and Opera, making me think that the 
caching is somewhere else.

What's frustrating me is that there are dozens of different versions of my 
CSS file being kept somewhere. If I reuse a name from weeks ago, all the old 
values are still present. But I've tried searching the disks of both the 
client and server machines, and I don't find that content. I guess that 
means that the cached data is in some other format, perhaps compressed. It's 
very odd. I haven't had this problem when developing across physically 
distinct client and server machines, so I'm suspicious that it has something 
to do with the VM environment, but I don't know where else to look. I was 
just hoping somebody on this list might have a similar development 
environment and could have seen this problem.

Does Apache ever cache anything, maybe just in memory, if the mod_cache 
extension isn't enabled? Is there a mechanism for examining its memory 
cache?

Chris

*****************************************
Chris L Peterson
Cloudbait Observatory
http://www.cloudbait.com


----- Original Message ----- 
From: "Dan Poirier" <po...@pobox.com>
To: <us...@httpd.apache.org>
Sent: Tuesday, February 03, 2009 7:24 AM
Subject: [users@httpd] Re: Can't figure out where data is being cached


> I'm still suspicious of the browser, but don't have any specific advice
> there.
>
> I did find this which you could try if all else fails:
>
> http://www.stefanhayden.com/blog/2006/04/03/css-caching-hack/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Can't figure out where data is being cached

Posted by Dan Poirier <po...@pobox.com>.
I'm still suspicious of the browser, but don't have any specific advice
there.

I did find this which you could try if all else fails:

http://www.stefanhayden.com/blog/2006/04/03/css-caching-hack/

-- 
Dan Poirier <po...@pobox.com>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org