Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
36babae5
Commit
36babae5
authored
Mar 11, 2002
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
striing module free zone
parent
d891e363
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
9 deletions
+7
-9
lib/python/Products/StandardCacheManagers/AcceleratedHTTPCacheManager.py
...ucts/StandardCacheManagers/AcceleratedHTTPCacheManager.py
+5
-6
lib/python/Products/StandardCacheManagers/RAMCacheManager.py
lib/python/Products/StandardCacheManagers/RAMCacheManager.py
+2
-3
No files found.
lib/python/Products/StandardCacheManagers/AcceleratedHTTPCacheManager.py
View file @
36babae5
...
...
@@ -25,7 +25,6 @@ import Globals
from
Globals
import
DTMLFile
import
urlparse
,
httplib
from
urllib
import
quote
from
string
import
lower
,
join
,
split
from
App.Common
import
rfc1123_date
...
...
@@ -46,13 +45,13 @@ class AcceleratedHTTPCache (Cache):
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 @@ class AcceleratedHTTPCache (Cache):
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 @@ class AcceleratedHTTPCache (Cache):
caches
=
{}
PRODUCT_DIR
=
split
(
__name__
,
'.'
)[
-
2
]
PRODUCT_DIR
=
__name__
.
split
(
'.'
)[
-
2
]
class
AcceleratedHTTPCacheManager
(
CacheManager
,
SimpleItem
):
' '
...
...
@@ -193,7 +192,7 @@ class AcceleratedHTTPCacheManager (CacheManager, SimpleItem):
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
:
...
...
lib/python/Products/StandardCacheManagers/RAMCacheManager.py
View file @
36babae5
...
...
@@ -24,7 +24,6 @@ from thread import allocate_lock
import
time
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 @@ class RAMCache (Cache):
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 @@ class RAMCache (Cache):
self
.
writelock
.
release
()
caches
=
{}
PRODUCT_DIR
=
split
(
__name__
,
'.'
)[
-
2
]
PRODUCT_DIR
=
__name__
.
split
(
'.'
)[
-
2
]
class
RAMCacheManager
(
CacheManager
,
SimpleItem
):
' '
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment