Skip to content

Commit

Permalink
fix: deno.land/x cache will always renew on vscode restart after 24 h…
Browse files Browse the repository at this point in the history
…ours (denoland#191)
  • Loading branch information
CGQAQ committed Sep 13, 2020
1 parent b06b99f commit f494af3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/src/language/import_completion_enhanced.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,12 @@ export class ImportCompletionEnhanced {
!this.mod_list_cache.get() ||
this.mod_list_cache.get()?.length === 0
) {
await this.mod_list_cache.set([]);
await this.mod_list_cache.destroy_cache();
this.mod_list_cache = await PermCache.create<ModList>(
"mod_list",
60 * 60 * 24 /* expiring in a day */
);
this.mod_list_cache.set([]);
progress.report(0);
if (
this.mod_list_cache.transaction_begin() === TRANSACTION_STATE.SUCCESS
Expand Down

0 comments on commit f494af3

Please sign in to comment.