Skip to content

Commit 5a346ce

Browse files
committed
Delete .cache dir on wipe
We are not deleting this directory, here is where PIP caches its packages. Users can still get the old (buggy) PIP version because of this. But why wiping worked for a lot of people? Because after wiping, we recreate the virtual environment and looks like PIP doesn't use the packages from the cache. But in the next build, when reusing the virtual environment, it will use the packages from the cache.
1 parent c3001be commit 5a346ce

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

readthedocs/core/utils/general.py

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def wipe_version_via_slugs(version_slug, project_slug):
2020
os.path.join(version.project.doc_path, 'checkouts', version.slug),
2121
os.path.join(version.project.doc_path, 'envs', version.slug),
2222
os.path.join(version.project.doc_path, 'conda', version.slug),
23+
os.path.join(version.project.doc_path, '.cache', version.slug),
2324
]
2425
for del_dir in del_dirs:
2526
broadcast(type='build', task=remove_dirs, args=[(del_dir,)])

readthedocs/projects/tasks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1549,7 +1549,7 @@ def clean_build(version_pk):
15491549
# because we are syncing the servers with an async task.
15501550
del_dirs = [
15511551
os.path.join(version.project.doc_path, dir_, version.slug)
1552-
for dir_ in ('checkouts', 'envs', 'conda')
1552+
for dir_ in ('checkouts', 'envs', 'conda', '.cache')
15531553
]
15541554
try:
15551555
with version.project.repo_nonblockinglock(version):

0 commit comments

Comments
 (0)