Hello

I'm trying to get mod_cache and mod_disk_cache to work correctly.
Problem summary is that disk cache is unable to overwrite previously
cached content (on disk) for the same url.

I run httpd 2.2.8 on windows XP.

my very basic setup:

LogLevel warn

<IfModule mod_cache.c>
  <IfModule mod_disk_cache.c>
    CacheRoot D:/tmp2
  </IfModule>
</IfModule>



<VirtualHost *:80>
   DocumentRoot D:\foo
   ServerName foo

   CacheEnable disk /

   CustomLog logs/foo.log common
   ErrorLog logs/foo-error.log
</VirtualHost>


I store a test.html in d:\foo\ which contains text: 1
I hit http://foo/test.html
mod_cache caches content
In the browser I get: 1

mod_cache log:
[debug] mod_cache.c(131): Adding CACHE_SAVE filter for /test.html
[debug] mod_cache.c(138): Adding CACHE_REMOVE_URL filter for /test.html
[debug] mod_cache.c(633): cache: Caching url: /test.html
[debug] mod_cache.c(639): cache: Removing CACHE_REMOVE_URL filter.
[debug] mod_disk_cache.c(962): disk_cache: Stored headers for URL
http://foo:80/test.html?
[debug] mod_disk_cache.c(1051): disk_cache: Body for URL
http://foo:80/test.html? cached.

I edit test.html and change it's text to: 2
I save and close.
I hit http://foo/test.html
mod_cache detects change on content
caches new content on new tmp file
attempts to overwrite previous cache for same file, AND FAILS MISERABLY
In the browser I get: 2

mod_cache log:
[debug] mod_disk_cache.c(476): disk_cache: Recalled cached URL info
header http://foo:80/test.html?
[debug] mod_disk_cache.c(749): disk_cache: Recalled headers for URL
http://foo:80/test.html?
[debug] cache_storage.c(272): Cached response for /test.html isn't
fresh.  Adding/replacing conditional request headers.
[debug] mod_cache.c(131): Adding CACHE_SAVE filter for /test.html
[debug] mod_cache.c(138): Adding CACHE_REMOVE_URL filter for /test.html
[debug] mod_cache.c(633): cache: Caching url: /test.html
[debug] mod_cache.c(639): cache: Removing CACHE_REMOVE_URL filter.
[debug] mod_disk_cache.c(962): disk_cache: Stored headers for URL
http://foo:80/test.html?
[warn] (OS 5)Access is denied.  : disk_cache: rename tempfile to
datafile failed: D:/tmp2/aptmpeUCRVw ->
D:/tmp2/JJ/Co/RO/5y2r4zwr3BnlGaXQ.data
[debug] mod_disk_cache.c(1051): disk_cache: Body for URL
http://foo:80/test.html? cached.


I hit http://foo/test.html
mod_cache fetches cached content
In browser I get: 1 (THIS IS BAD. I SHOULD HAVE GOT 2)

[debug] mod_disk_cache.c(476): disk_cache: Recalled cached URL info
header http://foo:80/test.html?
[debug] mod_disk_cache.c(749): disk_cache: Recalled headers for URL
http://foo:80/test.html?
[debug] cache_storage.c(272): Cached response for /test.html isn't
fresh.  Adding/replacing conditional request headers.
[debug] mod_cache.c(131): Adding CACHE_SAVE filter for /test.html
[debug] mod_cache.c(138): Adding CACHE_REMOVE_URL filter for /test.html
[debug] mod_cache.c(633): cache: Caching url: /test.html
[debug] mod_cache.c(639): cache: Removing CACHE_REMOVE_URL filter.
[debug] mod_disk_cache.c(962): disk_cache: Stored headers for URL
http://foo:80/test.html?


Notice the [warn] on the 2nd attempt. The cache of content "2" was
stored but could not be moved to the correct place.
Any subsequent requests bring me the old page which contains "1".

Any ideas?
I've tried this in apache 2.0 and 2.2

thanks,
Ioannis




---------------------------------------------------------------------
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: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to