You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2008/05/20 17:16:29 UTC

DO NOT REPLY [Bug 45045] New: mod cache storing/looking for the wrong key

https://issues.apache.org/bugzilla/show_bug.cgi?id=45045

           Summary: mod cache storing/looking for the wrong key
           Product: Apache httpd-2
           Version: 2.2.8
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: mod_cache
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: anders@emunityedge.se


I have configures mod mem cache as follows:

        ExpiresActive On
        ExpiresDefault "access plus 1 days"

        CacheEnable mem /
        MCacheSize 409600
        MCacheMaxObjectSize 150000

Everything seems fine but when I look at the debug log for repeat request to
the same file I see:

[debug] mod_cache.c(131): Adding CACHE_SAVE filter for /jessicasimpson1.jpg
[debug] mod_cache.c(138): Adding CACHE_REMOVE_URL filter or
/jessicasimpson1.jpg
[debug] mod_cache.c(633): cache: Caching url: /jessicasimpson1.jpg
[debug] mod_cache.c(639): cache: Removing CACHE_REMOVE_URL filter.
[info] mem_cache: Cached url:
ttp://proxy.starlounge.com:80/jessicasimpson1.jpg?
[debug] mod_cache.c(131): Adding CACHE_SAVE filter for /jessicasimpson1.jpg
[debug] mod_cache.c(138): Adding CACHE_REMOVE_URL filter or
/jessicasimpson1.jpg
[debug] mod_cache.c(633): cache: Caching url: /jessicasimpson1.jpg
[debug] mod_cache.c(639): cache: Removing CACHE_REMOVE_URL filter.
[info] mem_cache: Cached url:
ttp://proxy.starlounge.com:80/jessicasimpson1.jpg?

The ? at the end seems to be the issue. The key gets mangled somewhere because
if I make a request with ? on the end that too is cached and subsequent
requests are served from cache.

request for jpg? gives: (note no apparent difference)

[debug] mod_cache.c(131): Adding CACHE_SAVE filter for /jessicasimpson1.jpg
[debug] mod_cache.c(138): Adding CACHE_REMOVE_URL filter or
/jessicasimpson1.jpg
[debug] mod_cache.c(633): cache: Caching url: /jessicasimpson1.jpg?
[debug] mod_cache.c(639): cache: Removing CACHE_REMOVE_URL filter.
[info] mem_cache: Cached url:
ttp://proxy.starlounge.com:80/jessicasimpson1.jpg?

now request for both jpg and jpg? gives:

[debug] mod_cache.c(282): cache: running CACHE_OUT filter
[debug] mod_cache.c(296): cache: serving /jessicasimpson1.jpg

Seems this could be just a miss in a string parse.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 45045] mod cache storing/looking for the wrong key

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45045


Ruediger Pluem <rp...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




--- Comment #1 from Ruediger Pluem <rp...@apache.org>  2008-05-20 12:08:44 PST ---
This has nothing to do with the key of cached object. Although the debug
messages might be confusing everything is ok and the real key is
http://proxy.starlounge.com:80/jessicasimpson1.jpg?.
The problem is that mod_mem_cache holds a *PER* process cache. So your second
request was handled by a process that did not have
http://proxy.starlounge.com:80/jessicasimpson1.jpg? cached. Use mod_disk_cache
if you want to share the cache between multiple processes.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 45045] mod cache storing/looking for the wrong key

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45045





--- Comment #3 from Nick Kew <ni...@webthing.com>  2008-05-21 05:21:51 PST ---
Done already - see
http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_mem_cache.xml?r1=656733&r2=656732&pathrev=656733
and give it time to propagate.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 45045] mod cache storing/looking for the wrong key

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45045





--- Comment #2 from Anders Engle <an...@emunityedge.se>  2008-05-21 01:09:31 PST ---
(In reply to comment #1)
> This has nothing to do with the key of cached object. Although the debug
> messages might be confusing everything is ok and the real key is
> http://proxy.starlounge.com:80/jessicasimpson1.jpg?.
> The problem is that mod_mem_cache holds a *PER* process cache. So your second
> request was handled by a process that did not have
> http://proxy.starlounge.com:80/jessicasimpson1.jpg? cached. Use mod_disk_cache
> if you want to share the cache between multiple processes.

Makes perfect sense. The debug is slightly confusing.

Perhaps "mod_mem_cache holds a *PER* process cache. Use mod_disk_cache if you
want to share the cache between multiple processes." could be added to the
documentation. There is already a section under mod_cache that explains the
difference between disk/mem cache.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org