0

I have read an article here but I don't understand exactly how to configure it as described. Actually what I want is serving images fast using wither memory or desk - I have searched and tried to configure it but none of them worked as I expected. I also searched in this community but again I haven't found an answer although there are many posts on this subject.

My previous configuration as follows:

  <IfModule mod_cache.c>
    LoadModule cache_disk_module /usr/lib/apache2/modules/mod_cache_disk.so
    <IfModule mod_mem_cache.c>
      CacheEnable mem /
      MCacheSize 4096
      MCacheMaxObjectCount 100
      MCacheMinObjectSize 1
      MCacheMaxObjectSize 2048
   </IfModule>
</IfModule>

It is not working. Please could you help to understand what is wrong?

Thanks

tanz
  • 2,557
  • 20
  • 31
sampath challa
  • 353
  • 2
  • 7

1 Answers1

0

I would recommend to use mod_disk_cache as it would be faster than mod_mem_cache. Please try below settings.

<IfModule mod_cache.c>
LoadModule cache_disk_module /usr/lib/apache2/modules/mod_cache_disk.so
<IfModule mod_disk_cache.c>
CacheDefaultExpire 3600
CacheEnable disk /
CacheRoot "/path/to/cache/folder/"
CacheDirLevels 2
CacheDirLength 1
</IfModule>
</IfModule>
Alpesh Bhavsar
  • 171
  • 2
  • 10
  • thanks @Alpesh for your reply,presently my images are in apche2 "var/www/etc" directory, my question is for every request we have to read from disk instead of cache. is it fast than cache – sampath challa Jan 31 '14 at 07:58