Skip to content

Commit

Permalink
add suggestions to cache only if api returns non empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikvirendrar committed Jul 24, 2024
1 parent c4c85d3 commit 8376652
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/suggestions-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type CacheEntry = {

const MAX_CACHE_SIZE = 10000;
const SAVE_THRESHOLD = 20;
const CACHE_KEY = 'transliterateCache';
const CACHE_KEY = 'transliterationCache';

const cache: Record<string, Record<string, CacheEntry>> = loadCacheFromLocalStorage();
let newEntriesCount = 0;
Expand Down

0 comments on commit 8376652

Please sign in to comment.