Commit e0f61545 authored by Fabien Morin's avatar Fabien Morin

* add a script that set automatically a HTTP Cache on all skins

* add a http cache

The script ERP5Site_setSkinCache have to be launch on a new instance to make the http cache working.
Thanks to yusei for his help.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23316 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a57ebfaa
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="AcceleratedHTTPCacheManager" module="Products.StandardCacheManagers.AcceleratedHTTPCacheManager"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_AcceleratedHTTPCacheManager__cacheid</string> </key>
<value> <string>211063852_1220267953.233876</string> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_settings</string> </key>
<value>
<dictionary>
<item>
<key> <string>anonymous_only</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>interval</string> </key>
<value> <int>3600</int> </value>
</item>
<item>
<key> <string>notify_urls</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>root_http_skin_cache</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>cache_manager_id = \'root_http_skin_cache\'\n
result = []\n
\n
def setCache(skin):\n
for o in skin.objectValues():\n
id = o.id\n
if callable(id): id = id()\n
if o.meta_type in (\'Image\', \'File\') or id.endswith(\'.css\') or id.endswith(\'.js\'):\n
o.ZCacheable_setManagerId(cache_manager_id)\n
result.append(id)\n
elif o.meta_type == \'Folder\':\n
setCache(o)\n
\n
for skin in context.portal_skins.objectValues():\n
setCache(skin)\n
\n
return "\\n".join(result)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>cache_manager_id</string>
<string>result</string>
<string>setCache</string>
<string>_getiter_</string>
<string>_getattr_</string>
<string>context</string>
<string>skin</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_setSkinCache</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
267
\ No newline at end of file
268
\ No newline at end of file
portal_caches/erp5_session_cache
portal_caches/erp5_session_cache/default_ram_cache
root_http_skin_cache
web_page_module/9
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment