[Zope-Checkins] CVS: Zope/lib/python/Products/StandardCacheManagers - AcceleratedHTTPCacheManager.py:1.10 RAMCacheManager.py:1.9

Andreas Jung andreas@digicool.com
Mon, 11 Mar 2002 11:08:56 -0500


Update of /cvs-repository/Zope/lib/python/Products/StandardCacheManagers
In directory cvs.zope.org:/tmp/cvs-serv24922

Modified Files:
	AcceleratedHTTPCacheManager.py RAMCacheManager.py 
Log Message:
striing module free zone


=== Zope/lib/python/Products/StandardCacheManagers/AcceleratedHTTPCacheManager.py 1.9 => 1.10 ===
 import urlparse, httplib
 from urllib import quote
-from string import lower, join, split
 from App.Common import rfc1123_date
 
 
@@ -46,13 +45,13 @@
         phys_path = ob.getPhysicalPath()
         if self.hit_counts.has_key(phys_path):
             del self.hit_counts[phys_path]
-        ob_path = quote(join(phys_path, '/'))
+        ob_path = quote('/'.join(phys_path))
         results = []
         for url in self.notify_urls:
             if not url:
                 continue
             # Send the PURGE request to each HTTP accelerator.
-            if lower(url[:7]) == 'http://':
+            if url[:7].lower() == 'http://':
                 u = url
             else:
                 u = 'http://' + url
@@ -68,7 +67,7 @@
             errcode, errmsg, headers = h.getreply()
             h.getfile().read()  # Mandatory for httplib?
             results.append('%s %s' % (errcode, errmsg))
-        return 'Server response(s): ' + join(results, ';')
+        return 'Server response(s): ' + ';'.join(results)
 
     def ZCache_get(self, ob, view_name, keywords, mtime_func, default):
         return default
@@ -105,7 +104,7 @@
 
 
 caches = {}
-PRODUCT_DIR = split(__name__, '.')[-2]
+PRODUCT_DIR = __name__.split('.')[-2]
 
 class AcceleratedHTTPCacheManager (CacheManager, SimpleItem):
     ' '
@@ -193,7 +192,7 @@
         c = self.ZCacheManager_getCache()
         rval = []
         for path, (anon, auth) in c.hit_counts.items():
-            rval.append({'path': join(path, '/'),
+            rval.append({'path': '/'.join(path),
                          'anon': anon,
                          'auth': auth})
         if sort_by:


=== Zope/lib/python/Products/StandardCacheManagers/RAMCacheManager.py 1.8 => 1.9 ===
 import Globals
 from Globals import DTMLFile
-from string import join, split
 
 try: from cPickle import Pickler
 except: from pickle import Pickler
@@ -246,7 +245,7 @@
                 if view not in views:
                     views.append(view)
             views.sort()
-            info = {'path': join(oc.physical_path, '/'),
+            info = {'path': '/'.join(oc.physical_path),
                     'hits': oc.hits,
                     'misses': oc.misses,
                     'size': size,
@@ -320,7 +319,7 @@
             self.writelock.release()
 
 caches = {}
-PRODUCT_DIR = split(__name__, '.')[-2]
+PRODUCT_DIR = __name__.split('.')[-2]
 
 class RAMCacheManager (CacheManager, SimpleItem):
     ' '