mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-16 18:29:08 +00:00
feat(Server): invalidate caches on changes
This commit is contained in:
parent
0e70e2590b
commit
4ffd5014df
3 changed files with 32 additions and 2 deletions
|
@ -238,6 +238,15 @@ class DiscordService extends Service {
|
|||
|
||||
return returnVal
|
||||
}
|
||||
|
||||
invalidate(deadKey) {
|
||||
const keys = this.cache.keys()
|
||||
for (let key of keys) {
|
||||
if (key.includes(deadKey)) {
|
||||
this.cache.del(key)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = DiscordService
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue