From 99b45621795a55cb4a2079f1c0d084c43e61bcda Mon Sep 17 00:00:00 2001 From: Ivan Tyagov <ivan@nexedi.com> Date: Wed, 1 Nov 2006 10:04:07 +0000 Subject: [PATCH] Initial import of PropertySheets for Cache configuration objects git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11031 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/PropertySheet/BaseCachePlugin.py | 12 ++++++++++++ product/ERP5Type/PropertySheet/CacheFactory.py | 13 +++++++++++++ .../PropertySheet/DistributedRamCachePlugin.py | 12 ++++++++++++ product/ERP5Type/PropertySheet/SQLCachePlugin.py | 11 +++++++++++ 4 files changed, 48 insertions(+) create mode 100644 product/ERP5Type/PropertySheet/BaseCachePlugin.py create mode 100644 product/ERP5Type/PropertySheet/CacheFactory.py create mode 100644 product/ERP5Type/PropertySheet/DistributedRamCachePlugin.py create mode 100644 product/ERP5Type/PropertySheet/SQLCachePlugin.py diff --git a/product/ERP5Type/PropertySheet/BaseCachePlugin.py b/product/ERP5Type/PropertySheet/BaseCachePlugin.py new file mode 100644 index 0000000000..340e1fdf87 --- /dev/null +++ b/product/ERP5Type/PropertySheet/BaseCachePlugin.py @@ -0,0 +1,12 @@ +class BaseCachePlugin: + """ + """ + + _properties = ( + {'id' : 'cache_expire_check_interval', + 'description' : 'Cache expire check interval', + 'type' : 'int', + 'default' : 360, + 'mode' : 'w' , + },) + diff --git a/product/ERP5Type/PropertySheet/CacheFactory.py b/product/ERP5Type/PropertySheet/CacheFactory.py new file mode 100644 index 0000000000..a60071c9d4 --- /dev/null +++ b/product/ERP5Type/PropertySheet/CacheFactory.py @@ -0,0 +1,13 @@ +class CacheFactory: + """ + CacheFactory. + """ + + _properties = ( + { 'id' : 'cache_duration', + 'description' : 'Cache duration', + 'type' : 'int', + 'default' : 360, + 'mode' : 'w' , + }, + ) diff --git a/product/ERP5Type/PropertySheet/DistributedRamCachePlugin.py b/product/ERP5Type/PropertySheet/DistributedRamCachePlugin.py new file mode 100644 index 0000000000..b89aade9b4 --- /dev/null +++ b/product/ERP5Type/PropertySheet/DistributedRamCachePlugin.py @@ -0,0 +1,12 @@ +class DistributedRamCachePlugin: + """ + """ + + _properties = ( + {'id' : 'server', + 'description' : 'Memcached server address( you can specify multiple servers by separating them with ;)', + 'type' : 'string', + 'default' : '127.0.0.1:11211', + }, + ) + diff --git a/product/ERP5Type/PropertySheet/SQLCachePlugin.py b/product/ERP5Type/PropertySheet/SQLCachePlugin.py new file mode 100644 index 0000000000..baf18d9f22 --- /dev/null +++ b/product/ERP5Type/PropertySheet/SQLCachePlugin.py @@ -0,0 +1,11 @@ +class SQLCachePlugin: + """ + """ + + _properties = ( + {'id' : 'cache_table_name', + 'description' : 'Cache table name', + 'type' : 'string', + 'default' : 'cache', + }, + ) -- 2.30.9