Skip to content

fix: cache clear now deletes dep files from disk, not just JSON#2449

Open
Bhumika-SN wants to merge 1 commit intojbangdev:mainfrom
Bhumika-SN:fix/deps-cache-clear-not-deleting-files
Open

fix: cache clear now deletes dep files from disk, not just JSON#2449
Bhumika-SN wants to merge 1 commit intojbangdev:mainfrom
Bhumika-SN:fix/deps-cache-clear-not-deleting-files

Conversation

@Bhumika-SN
Copy link
Copy Markdown

Problem

jbang cache clear was not actually clearing the dependency cache from disk.

The DependencyCache.clear() method only set the in-memory depCache to null,
but never deleted the actual cached files on disk. This means running
jbang cache clear would leave all downloaded JARs and the dependency_cache.json
file still present on disk.

Fix

Updated DependencyCache.clear() to also:

  • Delete the dependency_cache.json file from disk
  • Delete the depcache directory containing actual downloaded JARs

Related Issue

Fixes #475

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jbang cache clear does not nuke dependency cache

1 participant