mirror of
https://github.com/BluemediaGER/muse.git
synced 2024-11-23 09:15:29 +01:00
parent
a8676e6ebd
commit
c23f04ba5a
|
@ -25,6 +25,10 @@ export default class CacheProvider {
|
||||||
expiresIn,
|
expiresIn,
|
||||||
} = options[options.length - 1] as Options;
|
} = 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);
|
const cachedResult = await Cache.findByPk(key);
|
||||||
|
|
||||||
if (cachedResult) {
|
if (cachedResult) {
|
||||||
|
|
Loading…
Reference in a new issue