Skip to content

Commit ce44a42

Browse files
i404788grantjenks
authored andcommitted
Use disk provided by the user whenever possible
1 parent c4ba1f7 commit ce44a42

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

diskcache/fanout.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def __init__(self, directory=None, shards=8, timeout=0.010, disk=Disk,
3636

3737
self._count = shards
3838
self._directory = directory
39+
self._disk = disk
3940
self._shards = tuple(
4041
Cache(
4142
directory=op.join(directory, '%03d' % num),
@@ -622,7 +623,7 @@ def cache(self, name):
622623
except KeyError:
623624
parts = name.split('/')
624625
directory = op.join(self._directory, 'cache', *parts)
625-
temp = Cache(directory=directory)
626+
temp = Cache(directory=directory, disk=self._disk)
626627
_caches[name] = temp
627628
return temp
628629

0 commit comments

Comments
 (0)