Cyclone3 Skin

Page cache

From Cyclone3 Wiki

(Difference between revisions)
(Working Tests)
Current revision (16:22, 22 October 2012) (edit) (undo)
 
Line 1: Line 1:
-
Page (or [[type of service]]) cache is a planned feature to not store only datas, objects, SQL's and [[module]] output in [[cache]], but the whole page.
+
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="+1D" />
+
<CONF_VAR id="Expires" value="+30M" />
-
:<CONF_VAR id="Cache-Control" value="public" />
+
<CONF_VAR id="Cache-Control" value="public" />
-
:<CONF_VAR id="Pragma" value="" />
+
<CONF_VAR id="Pragma" value="" />
-
== Problems ==
+
== Cache in Apache2 memory ==
-
* We are requiring to process in every request the [[user management]].
+
Enable mod_cache and mod_mem_cache
-
* Every generated page has post-processing for translating links to rewrited and encrypted form.
+
-
[[Category:Labs]]
+
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>