| Trees | Indices | Help |
|---|
|
|
object --+
|
base.AxObject --+
|
TemplateCache
Implementation of the aXAPI slb.template.cache.* method to
manage the SLB cache template as getAll/searchByName/create/delete/update
Usage:
# cache template with options:
# name (required) cache template name
# age (second)
# max_cache max cache size (MB)
# min_content min content size (Bytes)
# max_content max content size (Bytes)
# rep_policy least frequently used(0)
# acc_rel_req accept reload request, disabled(0) or enabled(1)
# veri_host verify host, disabled(0) or enabled(1)
# def_pol_no_cache default policy no cache, disabled(0) or enabled(1)
# insert_age insert age, disabled(0) or enabled(1)
# insert_via insert via, disabled(0) or enabled(1)
# policy_list XML tag for the collection of policys
# uri URI
# action cache(0), no cache(1) or invalidate(2)
# duration duration (second), only when act is cache(0)
# pattern only when act is invalidate(2)
# Example: create a cache template
# !
# slb template cache my_cache_templ1
# policy uri abc nocache
# policy uri 123 nocache
# !
cache1 = TemplateRamCache(name="my_cache_templ1")
cache1.policy_list = [{"uri": "abc", "action": 1}, {"uri": "123", "action": 1}]
cache1.create()
# get all cache templates
caches = TemplateRamCache.getAll()
for e in caches:
print e
# use aCache here
...
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
|||
|
|||
|
|||
__display__ =
|
|||
__obj_name__ =
|
|||
__xml_convrt__ =
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
__xml_convrt__
|
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Fri Dec 27 11:20:20 2013 | http://epydoc.sourceforge.net |