Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pyfs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pyfs
Commits
814dcd50
Commit
814dcd50
authored
Oct 09, 2010
by
rfkelly0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CacheFS: add cache handling for listdirinfo method
parent
1024ec16
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
+6
-1
fs/__init__.py
+1
-1
fs/remote.py
+5
-0
No files found.
fs/__init__.py
View file @
814dcd50
...
@@ -15,7 +15,7 @@ implementations of this interface such as:
...
@@ -15,7 +15,7 @@ implementations of this interface such as:
"""
"""
__version__
=
"0.4.0a
1
"
__version__
=
"0.4.0a
2
"
__author__
=
"Will McGugan (will@willmcgugan.com)"
__author__
=
"Will McGugan (will@willmcgugan.com)"
# 'base' imports * from 'path' and 'errors', so their
# 'base' imports * from 'path' and 'errors', so their
...
...
fs/remote.py
View file @
814dcd50
...
@@ -403,6 +403,7 @@ class CacheFS(WrapFS):
...
@@ -403,6 +403,7 @@ class CacheFS(WrapFS):
cache
[
""
]
.
pop
(
"getinfo"
,
None
)
cache
[
""
]
.
pop
(
"getinfo"
,
None
)
cache
[
""
]
.
pop
(
"getsize"
,
None
)
cache
[
""
]
.
pop
(
"getsize"
,
None
)
cache
[
""
]
.
pop
(
"listdir"
,
None
)
cache
[
""
]
.
pop
(
"listdir"
,
None
)
cache
[
""
]
.
pop
(
"listdirinfo"
,
None
)
# Clear all cached info for the path itself.
# Clear all cached info for the path itself.
cache
[
names
[
-
1
]]
=
{
""
:{}}
cache
[
names
[
-
1
]]
=
{
""
:{}}
...
@@ -423,6 +424,10 @@ class CacheFS(WrapFS):
...
@@ -423,6 +424,10 @@ class CacheFS(WrapFS):
return
super
(
CacheFS
,
self
)
.
listdir
(
path
,
**
kwds
)
return
super
(
CacheFS
,
self
)
.
listdir
(
path
,
**
kwds
)
@_cached_method
@_cached_method
def
listdirinfo
(
self
,
path
=
""
,
**
kwds
):
return
super
(
CacheFS
,
self
)
.
listdirinfo
(
path
,
**
kwds
)
@_cached_method
def
getinfo
(
self
,
path
):
def
getinfo
(
self
,
path
):
return
super
(
CacheFS
,
self
)
.
getinfo
(
path
)
return
super
(
CacheFS
,
self
)
.
getinfo
(
path
)
...
...
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