mod_mem_cache Issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've been trying to setup apache to do memory caching of my static files, I run 4 servers serving only .js and .css files as well as some images. this machines have 2 gigs of ram and only run apache. I've been able to use the file cache without a problem and can see it caches them in the error log with level debug but when i enable it for memory it will always re request the file even though it says it cached the url

Here is some info

[root@static1 ~]# cat /etc/httpd/conf.d/cache.conf
LoadModule cache_module modules/mod_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule disk_cache_module modules/mod_disk_cache.so
MCacheMaxObjectCount 65536
MCacheMaxObjectSize 1000
MCacheMinObjectSize 5
MCacheMaxStreamingBuffer 65536
MCacheRemovalAlgorithm GDSF
MCacheSize 10000
CacheRoot /var/lib/httpdcache
CacheDirLevels 5
CacheDirLength 3


<VirtualHost *:80>
    DocumentRoot /var/www/html
    ServerName static.yuku.com
    CacheEnable mem /
    CacheIgnoreCacheControl On
    CacheIgnoreNoLastMod On
    CacheStorePrivate On
    CacheStoreNoStore On
    CacheIgnoreQueryString Off
    CacheDefaultExpire 86400
    CacheMaxExpire 604800
    LogLevel debug
    ErrorLog logs/staticerror_logs
</VirtualHost>


Logs from errro log

[Thu May 29 13:54:50 2008] [debug] mod_cache.c(131): Adding CACHE_SAVE filter for /domainskins/bypass/img/ezboard/professional/closethread.gif
[Thu May 29 13:54:50 2008] [debug] mod_cache.c(138): Adding CACHE_REMOVE_URL filter for /domainskins/bypass/img/ezboard/professional/closethread.gif
[Thu May 29 13:54:50 2008] [debug] mod_cache.c(633): cache: Caching url: /domainskins/bypass/img/ezboard/professional/closethread.gif
[Thu May 29 13:54:50 2008] [debug] mod_cache.c(639): cache: Removing CACHE_REMOVE_URL filter.
[Thu May 29 13:54:50 2008] [info] mem_cache: Cached url: http://static.yuku.com:80/domainskins/bypass/img/ezboard/professional/closethread.gif?



Compared to when i use disk cache

[Thu May 29 13:55:49 2008] [debug] mod_cache.c(131): Adding CACHE_SAVE filter for /domainskins/bypass/img/ezboard/professional/closethread.gif
[Thu May 29 13:55:49 2008] [debug] mod_cache.c(138): Adding CACHE_REMOVE_URL filter for /domainskins/bypass/img/ezboard/professional/closethread.gif
[Thu May 29 13:55:49 2008] [debug] mod_cache.c(633): cache: Caching url: /domainskins/bypass/img/ezboard/professional/closethread.gif
[Thu May 29 13:55:49 2008] [debug] mod_cache.c(639): cache: Removing CACHE_REMOVE_URL filter.
[Thu May 29 13:55:49 2008] [debug] mod_disk_cache.c(962): disk_cache: Stored headers for URL http://static.yuku.com:80/domainskins/bypass/img/ezboard/professional/closethread.gif?
[Thu May 29 13:55:49 2008] [debug] mod_disk_cache.c(1051): disk_cache: Body for URL http://static.yuku.com:80/domainskins/bypass/img/ezboard/professional/closethread.gif? cached.
[Thu May 29 13:55:57 2008] [debug] mod_disk_cache.c(476): disk_cache: Recalled cached URL info header http://static.yuku.com:80/domainskins/bypass/img/ezboard/professional/closethread.gif?
[Thu May 29 13:55:57 2008] [debug] mod_disk_cache.c(749): disk_cache: Recalled headers for URL http://static.yuku.com:80/domainskins/bypass/img/ezboard/professional/closethread.gif?
[Thu May 29 13:55:57 2008] [debug] mod_cache.c(282): cache: running CACHE_OUT filter
[Thu May 29 13:55:57 2008] [debug] mod_cache.c(296): cache: serving /domainskins/bypass/img/ezboard/professional/closethread.gif


Disk cache works perfectly for when i want to cache output of dynamic pages but for static files it would be great if i could just spit them out from memory. I have tried making the size of the cache bigger in memory to 1 gig still same issue.

T




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux