You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by dreamice <dr...@gmail.com> on 2009/03/02 09:32:10 UTC

Apache Cache configuration

Dear All,

I configured the Apache cache mode by following the httpd document sample.
My configure is:

<IfModule mod_cache.c>
<IfModule mod_mem_cache.c>
CacheEnable mem /
CacheRoot /home/alex/apache/logs
MCacheSize 4096
MCacheMaxObjectCount 1000
MCacheMinObjectSize 1
MCacheMaxObjectSize 2048
MCacheRemovalAlgorithm  "LRU"
</IfModule>
</IfModule>

Unfortunately, there is no cache in my system. And all the client requests
are passed to the real server.
BTW, my equipment is acted as a reverse proxy.

Hope you can help me.
Thanks a lot. 
-- 
View this message in context: http://www.nabble.com/Apache-Cache-configuration-tp22283418p22283418.html
Sent from the Apache HTTP Server - Dev mailing list archive at Nabble.com.


Re: Apache Cache configuration

Posted by dreamice <dr...@gmail.com>.
Dear Graham,
Thanks for your reply.
Yes, I am using mem cache. When I test this case, I find that the client's
request is directly passed to the real server.
As I test the disk mode, there is also no data cached on my directory.
I dont know why.
Could any one come across with this case?
The reverse proxy mode.
Thanks

Graham Leggett wrote:
> 
> dreamice wrote:
> 
>> I configured the Apache cache mode by following the httpd document
>> sample.
>> My configure is:
>> 
>> <IfModule mod_cache.c>
>> <IfModule mod_mem_cache.c>
>> CacheEnable mem /
>> CacheRoot /home/alex/apache/logs
>> MCacheSize 4096
>> MCacheMaxObjectCount 1000
>> MCacheMinObjectSize 1
>> MCacheMaxObjectSize 2048
>> MCacheRemovalAlgorithm  "LRU"
>> </IfModule>
>> </IfModule>
>> 
>> Unfortunately, there is no cache in my system. And all the client
>> requests
>> are passed to the real server.
> 
> You're using the memory cache, so you're not going to find any cache on 
> disk (I am assuming you expect to find it at /home/alex/apache/logs?).
> 
> You're probably looking for the disk cache instead.
> 
> Also, make sure your content is cacheable in the first place. Many 
> application servers put cache control headers in that ask caches not to 
> cache, and httpd will respect these headers.
> 
> Regards,
> Graham
> --
> 
>  
> 

-- 
View this message in context: http://www.nabble.com/Apache-Cache-configuration-tp22283418p22286836.html
Sent from the Apache HTTP Server - Dev mailing list archive at Nabble.com.


Re: Apache Cache configuration

Posted by Graham Leggett <mi...@sharp.fm>.
dreamice wrote:

> I configured the Apache cache mode by following the httpd document sample.
> My configure is:
> 
> <IfModule mod_cache.c>
> <IfModule mod_mem_cache.c>
> CacheEnable mem /
> CacheRoot /home/alex/apache/logs
> MCacheSize 4096
> MCacheMaxObjectCount 1000
> MCacheMinObjectSize 1
> MCacheMaxObjectSize 2048
> MCacheRemovalAlgorithm  "LRU"
> </IfModule>
> </IfModule>
> 
> Unfortunately, there is no cache in my system. And all the client requests
> are passed to the real server.

You're using the memory cache, so you're not going to find any cache on 
disk (I am assuming you expect to find it at /home/alex/apache/logs?).

You're probably looking for the disk cache instead.

Also, make sure your content is cacheable in the first place. Many 
application servers put cache control headers in that ask caches not to 
cache, and httpd will respect these headers.

Regards,
Graham
--

Re: Apache Cache configuration

Posted by dreamice <dr...@gmail.com>.
My httpd version is 2.2.11, Is there anything wrong with that?
Thanks 


dreamice wrote:
> 
> Dear All,
> 
> I configured the Apache cache mode by following the httpd document sample.
> My configure is:
> 
> <IfModule mod_cache.c>
> <IfModule mod_mem_cache.c>
> CacheEnable mem /
> CacheRoot /home/alex/apache/logs
> MCacheSize 4096
> MCacheMaxObjectCount 1000
> MCacheMinObjectSize 1
> MCacheMaxObjectSize 2048
> MCacheRemovalAlgorithm  "LRU"
> </IfModule>
> </IfModule>
> 
> Unfortunately, there is no cache in my system. And all the client requests
> are passed to the real server.
> BTW, my equipment is acted as a reverse proxy.
> 
> Hope you can help me.
> Thanks a lot. 
> 

-- 
View this message in context: http://www.nabble.com/Apache-Cache-configuration-tp22283418p22283424.html
Sent from the Apache HTTP Server - Dev mailing list archive at Nabble.com.