I wish to use mod_disk_cache in apache to cache my xml feeds to some folder and serve direct from that folder. They are feeds dynamically produced by php - although not altering very frequently. I would like the caching in the htaccess level to prevent any strain/call to php and server stress low.
Has anybody carried this out before? Made it happen meet your needs? I am getting my server company to set up the modules I want and may then try it out myself.
I am wishing to make use of something such as:
<IfModule mod_cache.c> <IfModule mod_disk_cache.c> CacheRoot c:/cacheroot CacheEnable disk / CacheDirLevels 5 CacheDirLength 3 </IfModule> </IfModule>
I'm going to be delivering Expires: and Last-Modified: headers within the xml too.
Think this can produce the preferred solution and filling that cache folder and staying away from calls to php? Or perhaps is this method incorrectly? Thanks ahead of time for just about any guidance
It's not necessarily a bad factor. I have used it very long time ago. It really works.
But you need to know you will find now really better options when handling caches before an apache server. Among theses nice tools is Varnish. You'll have very fine tunnings available.
Here is a deep explanation of why varnish is really a modern oral appliance why this new method of while using OS (and never separating memory and disk in spirit) is nice : http://www.varnish-cache.org/trac/wiki/ArchitectNotes
Concerning the headers you need to use theses headers to talk with Varnish (or any other things, like web addresses) and allow the cache tool handle the ultimate headers.
If you'll have a immediate access in your server and not simply a small apache access check it out. Now if you're able to only access apache configuration... but ... c:/cacheroot, you are utilizing a home windows server being produced? You will need an Unix-like system for varnish ideally 64bits.
I made use of previously Apache with mod_cache on the Unix atmosphere. It labored fine with low user load, but days with heavy load the machine went lower all of the day.
After a little tests we gone to live in Varnish Cache and today everything works more effectively.
However , only Unix atmosphere is supported, a brand new varnish home windows cygwin-based version is available, however i don't if is appropriate for production atmosphere: