Page cache
From Cyclone3 Wiki
(Difference between revisions)
(→Working Tests) |
|||
Line 1: | Line 1: | ||
- | Page (or [[type of service]]) cache is a | + | Page (or [[type of service]]) cache is a feature to cache the whole page in combination with Apache2 mod_cache. |
== Working solution to cache whole generated page on client side == | == Working solution to cache whole generated page on client side == | ||
Line 5: | Line 5: | ||
Add into [[TypeID]] these lines | Add into [[TypeID]] these lines | ||
- | + | <CONF_VAR id="Expires" value="+30M" /> | |
- | + | <CONF_VAR id="Cache-Control" value="public" /> | |
- | + | <CONF_VAR id="Pragma" value="" /> | |
- | == | + | == Cache in Apache2 memory == |
- | + | Enable mod_cache and mod_mem_cache | |
- | + | ||
- | [[Category: | + | cd /etc/apache2/mods-enabled/ |
+ | ln -s ../mods-available/cache.load . | ||
+ | ln -s ../mods-available/mem_cache.load . | ||
+ | ln -s ../mods-available/mem_cache.conf . | ||
+ | |||
+ | Edit mem_cache.conf | ||
+ | |||
+ | <IfModule mod_mem_cache.c> | ||
+ | CacheEnable mem / | ||
+ | MCacheSize 40000 | ||
+ | MCacheMaxObjectCount 100 | ||
+ | MCacheMinObjectSize 1 | ||
+ | MCacheMaxObjectSize 100000 | ||
+ | CacheIgnoreHeaders Set-Cookie | ||
+ | CacheIgnoreCacheControl On | ||
+ | </IfModule> | ||
+ | |||
+ | [[Category:Framework]] | ||
+ | [[Category:Development]] |
Current revision
Page (or type of service) cache is a feature to cache the whole page in combination with Apache2 mod_cache.
Working solution to cache whole generated page on client side
Add into TypeID these lines
<CONF_VAR id="Expires" value="+30M" /> <CONF_VAR id="Cache-Control" value="public" /> <CONF_VAR id="Pragma" value="" />
Cache in Apache2 memory
Enable mod_cache and mod_mem_cache
cd /etc/apache2/mods-enabled/ ln -s ../mods-available/cache.load . ln -s ../mods-available/mem_cache.load . ln -s ../mods-available/mem_cache.conf .
Edit mem_cache.conf
<IfModule mod_mem_cache.c> CacheEnable mem / MCacheSize 40000 MCacheMaxObjectCount 100 MCacheMinObjectSize 1 MCacheMaxObjectSize 100000 CacheIgnoreHeaders Set-Cookie CacheIgnoreCacheControl On </IfModule>