[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-httpd-users
Subject:    Re: [users@httpd] Correct Apache cache keys on rewritten URL's
From:       adam.vest () vestfarms ! com
Date:       2019-03-30 12:25:56
Message-ID: 30f1975e01942670ccbb831de3934fc5 () vestfarms ! com
[Download RAW message or body]

As I consider this to be undesirable behavior on the part of the Apache 
cache, I went ahead and opened a bug report on this matter about a week 
ago:
* https://bz.apache.org/bugzilla/show_bug.cgi?id=63282

I tried sifting through the source code to find where it was defining 
the key to see if I could propose a change, but my limited C coding (and 
coding in general) was quickly overwhelmed. The change, at least 
conceptually, seems simple enough - instead of using the rewritten URI 
for the cache key, use the original URI.

On 2019-03-19 12:10, adam.vest@vestfarms.com wrote:
> Hello All,
> 
> I've been working on this for the past few days, attempting to find a
> way to get the Apache mod_disk_cache module to properly store requests
> that are rewritten. As I'm sure many of you are aware, it's fairly
> common practice these days for modern CMS's to just rewrite everything
> to index.php and let that handle things (so-called "pretty urls" or
> "permalinks"). However, this rewrite renders Apache's cache useless
> because this then means that ALL dynamic requests are cached under the
> same "http://domain.com/index.php" key, which would mean that anyone
> who would request, say, "http://domain.com/thing2" might get the
> content of "http://domain.com/thing1" that is already in the cache.
> 
> I've been trying many different approaches to fixing this (from
> attempting to detect when/if the URL was rewritten, to attempting to
> dynamically set the CacheKeyBaseURL directive), but so far I've been
> unable to come up with any way to resolve this issue. I feel like
> dynamically setting the "CacheKeyBaseURL" holds the most promise if
> this can actually be done, but then again fixing the Apache caching
> function to better handle rewritten URI's would be ideal.
> 
> Anyone have any thoughts on how I might get this working? Other than
> "don't use it" or "use something else" :) - I'd really like to use
> Apache cache if possible.
> 
> Thanks in advance!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic