v12.0.0 - initial commit

This commit is contained in:
padreug 2025-12-31 19:04:13 +01:00
commit e2c49ea43c
1145 changed files with 97211 additions and 0 deletions

View file

@ -0,0 +1,18 @@
const mem = require('mem')
const { machines } = require('typesafe-db')
// Cache configuration: 30 minutes
const CACHE_DURATION = 30 * 60 * 1000
const _getHighestRestrictionLevel = async () => {
return machines.getHighestRestrictionLevel()
}
const getCachedRestrictionLevel = mem(_getHighestRestrictionLevel, {
maxAge: CACHE_DURATION,
cacheKey: () => '',
})
module.exports = {
getCachedRestrictionLevel,
}