mirror of
https://github.com/BluemediaGER/muse.git
synced 2024-11-12 21:05:29 +01:00
parent
a8676e6ebd
commit
c23f04ba5a
|
@ -25,6 +25,10 @@ export default class CacheProvider {
|
|||
expiresIn,
|
||||
} = options[options.length - 1] as Options;
|
||||
|
||||
if (key.length < 4) {
|
||||
throw new Error(`Cache key ${key} is too short.`);
|
||||
}
|
||||
|
||||
const cachedResult = await Cache.findByPk(key);
|
||||
|
||||
if (cachedResult) {
|
||||
|
|
Loading…
Reference in a new issue