mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-04-24 19:59:12 +00:00
fix(Services): add option to disable caching for development
This commit is contained in:
parent
e2d63dc156
commit
f5abf34449
2 changed files with 8 additions and 0 deletions
|
@ -228,6 +228,10 @@ class DiscordService extends Service {
|
|||
}
|
||||
|
||||
async cacheCurry(key, func) {
|
||||
if (process.env.DISABLE_CACHE === 'true') {
|
||||
return func()
|
||||
}
|
||||
|
||||
if (this.cache.has(key)) {
|
||||
return this.cache.get(key)
|
||||
}
|
||||
|
|
|
@ -64,6 +64,10 @@ class PresentationService extends Service {
|
|||
}
|
||||
|
||||
async cacheCurry(key, func) {
|
||||
if (process.env.DISABLE_CACHE === 'true') {
|
||||
return func()
|
||||
}
|
||||
|
||||
if (this.cache.has(key)) {
|
||||
return this.cache.get(key)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue