forked from FoundKeyGang/FoundKey
fix parameter for cache fetcher
This commit is contained in:
parent
d1ec058d5c
commit
9d9b2da6cc
2 changed files with 2 additions and 2 deletions
|
@ -43,7 +43,7 @@ export class Cache<T> {
|
|||
if (cached !== undefined) {
|
||||
return cached;
|
||||
} else {
|
||||
const value = await this.fetcher();
|
||||
const value = await this.fetcher(key);
|
||||
|
||||
// don't cache undefined
|
||||
if (value !== undefined)
|
||||
|
|
|
@ -15,7 +15,7 @@ import { decodeReaction } from './reaction-lib.js';
|
|||
const cache = new Cache<Emoji | null>(
|
||||
12 * HOUR,
|
||||
async (key) => {
|
||||
const [host, name] = key.split(':');
|
||||
const [host, name] = key.split(':');
|
||||
return (await Emojis.findOneBy({
|
||||
name,
|
||||
host: host || IsNull(),
|
||||
|
|
Loading…
Reference in a new issue