From 0b456d68ba89ba15583dafc3876705840104ce2c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com>
Date: Tue, 10 Jul 2012 15:19:43 +0200
Subject: [PATCH] Use distributed cache.

---
 .../persistent_cache_plugin.xml               | 28 +++++++++++++++++++
 .../volatile_cache_plugin.xml                 | 20 -------------
 bt5/erp5_credential_oauth2/bt/revision        |  2 +-
 .../bt/template_path_list                     |  2 +-
 4 files changed, 30 insertions(+), 22 deletions(-)
 create mode 100644 bt5/erp5_credential_oauth2/PathTemplateItem/portal_caches/extrenal_oauth2_token_cache_factory/persistent_cache_plugin.xml
 delete mode 100644 bt5/erp5_credential_oauth2/PathTemplateItem/portal_caches/extrenal_oauth2_token_cache_factory/volatile_cache_plugin.xml

diff --git a/bt5/erp5_credential_oauth2/PathTemplateItem/portal_caches/extrenal_oauth2_token_cache_factory/persistent_cache_plugin.xml b/bt5/erp5_credential_oauth2/PathTemplateItem/portal_caches/extrenal_oauth2_token_cache_factory/persistent_cache_plugin.xml
new file mode 100644
index 0000000000..32cea51e82
--- /dev/null
+++ b/bt5/erp5_credential_oauth2/PathTemplateItem/portal_caches/extrenal_oauth2_token_cache_factory/persistent_cache_plugin.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="Distributed Ram Cache" module="erp5.portal_type"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>categories</string> </key>
+            <value>
+              <tuple>
+                <string>specialise/portal_memcached/default_memcached_plugin</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>persistent_cache_plugin</string> </value>
+        </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>Distributed Ram Cache</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_credential_oauth2/PathTemplateItem/portal_caches/extrenal_oauth2_token_cache_factory/volatile_cache_plugin.xml b/bt5/erp5_credential_oauth2/PathTemplateItem/portal_caches/extrenal_oauth2_token_cache_factory/volatile_cache_plugin.xml
deleted file mode 100644
index 3455556ba0..0000000000
--- a/bt5/erp5_credential_oauth2/PathTemplateItem/portal_caches/extrenal_oauth2_token_cache_factory/volatile_cache_plugin.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0"?>
-<ZopeData>
-  <record id="1" aka="AAAAAAAAAAE=">
-    <pickle>
-      <global name="Ram Cache" module="erp5.portal_type"/>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>volatile_cache_plugin</string> </value>
-        </item>
-        <item>
-            <key> <string>portal_type</string> </key>
-            <value> <string>Ram Cache</string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>
diff --git a/bt5/erp5_credential_oauth2/bt/revision b/bt5/erp5_credential_oauth2/bt/revision
index e440e5c842..bf0d87ab1b 100644
--- a/bt5/erp5_credential_oauth2/bt/revision
+++ b/bt5/erp5_credential_oauth2/bt/revision
@@ -1 +1 @@
-3
\ No newline at end of file
+4
\ No newline at end of file
diff --git a/bt5/erp5_credential_oauth2/bt/template_path_list b/bt5/erp5_credential_oauth2/bt/template_path_list
index f60e152655..bd4e9f0501 100644
--- a/bt5/erp5_credential_oauth2/bt/template_path_list
+++ b/bt5/erp5_credential_oauth2/bt/template_path_list
@@ -1,2 +1,2 @@
 portal_caches/extrenal_oauth2_token_cache_factory
-portal_caches/extrenal_oauth2_token_cache_factory/volatile_cache_plugin
\ No newline at end of file
+portal_caches/extrenal_oauth2_token_cache_factory/persistent_cache_plugin
\ No newline at end of file
-- 
2.30.9