🔍 fix: USE_REDIS condition, Markdown list counter, code highlights (#3806)

* fix: markdown rehype highlight accidental removal

* fix: USE_REDIS condition check

* fix: markdown list counter
This commit is contained in:
Danny Avila 2024-08-27 14:49:43 -04:00 committed by GitHub
parent f742b9972e
commit a267f6e0da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 52 additions and 20 deletions

View file

@ -35,7 +35,7 @@ const clearPendingReq = async ({ userId, cache: _cache }) => {
return;
}
const key = `${USE_REDIS ? namespace : ''}:${userId ?? ''}`;
const key = `${isEnabled(USE_REDIS) ? namespace : ''}:${userId ?? ''}`;
const currentReq = +((await cache.get(key)) ?? 0);
if (currentReq && currentReq >= 1) {