Back to index

plone3  3.1.7
Static Public Attributes | Private Member Functions | Static Private Attributes
CMFCore.exportimport.tests.test_cachingpolicymgr._CachingPolicyManagerSetup Class Reference
Inheritance diagram for CMFCore.exportimport.tests.test_cachingpolicymgr._CachingPolicyManagerSetup:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.exportimport.tests.test_cachingpolicymgr._CachingPolicyManagerSetup:
Collaboration graph
[legend]

List of all members.

Static Public Attributes

string POLICY_ID = 'policy_id'
string PREDICATE = "python:object.getId() == 'foo'"
string MTIME_FUNC = "object/modified"
int MAX_AGE_SECS = 60
string VARY = "Test"
string ETAG_FUNC = "object/getETag"
int S_MAX_AGE_SECS = 120
int PRE_CHECK = 42
int POST_CHECK = 43

Private Member Functions

def _initSite

Static Private Attributes

string _EMPTY_EXPORT
string _WITH_POLICY_EXPORT

Detailed Description

Definition at line 93 of file test_cachingpolicymgr.py.


Member Function Documentation

Definition at line 123 of file test_cachingpolicymgr.py.

00123 
00124     def _initSite(self, with_policy=False):
00125         from Products.CMFCore.CachingPolicyManager import CachingPolicyManager
00126 
00127         self.root.site = Folder(id='site')
00128         site = self.root.site
00129         mgr = CachingPolicyManager()
00130         site._setObject( mgr.getId(), mgr )
00131 
00132         if with_policy:
00133             mgr.addPolicy( policy_id=self.POLICY_ID
00134                          , predicate=self.PREDICATE
00135                          , mtime_func=self.MTIME_FUNC
00136                          , max_age_secs=self.MAX_AGE_SECS
00137                          , no_cache=True
00138                          , no_store=True
00139                          , must_revalidate=True
00140                          , vary=self.VARY
00141                          , etag_func=self.ETAG_FUNC
00142                          , s_max_age_secs=self.S_MAX_AGE_SECS
00143                          , proxy_revalidate=True
00144                          , public=True
00145                          , private=True
00146                          , no_transform=True
00147                          , enable_304s=True
00148                          , last_modified=False
00149                          , pre_check=self.PRE_CHECK
00150                          , post_check=self.POST_CHECK
00151                          )
00152 
00153         return site
00154 


Member Data Documentation

Initial value:
"""\
<?xml version="1.0"?>
<object name="caching_policy_manager" meta_type="CMF Caching Policy Manager"/>
"""

Definition at line 105 of file test_cachingpolicymgr.py.

Initial value:
"""\
<?xml version="1.0"?>
<object name="caching_policy_manager" meta_type="CMF Caching Policy Manager">
 <caching-policy name="%s" enable_304s="True"
etag_func="%s" last_modified="False" max_age_secs="%d"
mtime_func="%s" must_revalidate="True" no_cache="True"
no_store="True" no_transform="True" post_check="%d" pre_check="%d"
predicate="%s" private="True"
proxy_revalidate="True" public="True" s_max_age_secs="%d" vary="%s"/>
</object>
"""

Definition at line 110 of file test_cachingpolicymgr.py.

Definition at line 100 of file test_cachingpolicymgr.py.

Definition at line 98 of file test_cachingpolicymgr.py.

Definition at line 97 of file test_cachingpolicymgr.py.

Definition at line 95 of file test_cachingpolicymgr.py.

Definition at line 103 of file test_cachingpolicymgr.py.

Definition at line 102 of file test_cachingpolicymgr.py.

Definition at line 96 of file test_cachingpolicymgr.py.

Definition at line 101 of file test_cachingpolicymgr.py.

Definition at line 99 of file test_cachingpolicymgr.py.


The documentation for this class was generated from the following file: