Database & Cache Configuration
NookureStaff leverages Ebean ORM 19 with HikariCP connection pooling to manage database persistence, paired in NookureStaff+ with high-performance local (Caffeine) or distributed (Redis) cache backends.
Database Configuration
Section titled “Database Configuration”Database credentials and driver settings are defined in the database block of plugins/NookureStaff/config.yml (Paper) and plugins/nookurestaff/velocity.yml (Proxy).
Supported Engines
Section titled “Supported Engines”Recommended solely for standalone servers without cross-server requirements.
database: # The type of the database. # This can be either MYSQL or SQLITE. # For MariaDB, use MYSQL driver. type: SQLITE host: localhost port: 3306 username: nookure password: yourSecurePassword database: database- The SQLite database file (
database.db) will be created automatically in your plugin data folder.
Required for multi-server networks and Velocity proxy enforcement.
database: # The type of the database. # This can be either MYSQL or SQLITE. # For MariaDB, use MYSQL driver. # ¿When use MYSQL or SQLITE? # - If you have more than 1 server, use MYSQL. # - If you have only 1 server, but you want # to be able to scale, use MYSQL. type: MYSQL
# The host of the database. # This can be an IP address or a domain name. # ┏━━━━━━ Pterodactyl Users ━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ # ┃If you are using pterodactyl, I recommend using the ┃ # ┃docker bridge IP address, smth like 172.x.x.x ┃ # ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ host: localhost
# The port of the database. # This is usually 3306 for MySQL port: 3306
# The username of the database. username: nookure
# The password of the database. password: yourSecurePassword
# The name of the database. database: databaseCache Configuration (cache.yml)
Section titled “Cache Configuration (cache.yml)”NookureStaff uses an abstraction layer for caching active punishments, player metadata, staff states, and pre-login authorization tokens.
Configured in plugins/NookureStaff/cache.yml:
# The cache provider backend to use.# Options:# - CAFFEINE: Local in-memory cache (recommended for standalone servers).# - REDIS: Distributed Redis cache (recommended for multi-server networks and proxies# to ensure bans, mutes, and staff states are instantly synchronized).type: CAFFEINE
# Default expiration time for cached entries in seconds (default: 300 = 5 minutes).default-ttl-seconds: 300
# Maximum entries in local Caffeine cache before eviction (default: 5000).# Only applicable when using CAFFEINE.caffeine-max-size: 5000
# Dedicated Redis cache connection configuration.redis: # The address of the Redis server for cache. address: localhost # The port of the Redis server. Default is 6379. port: 6379 # The username to use when connecting to Redis (Redis 6+ ACL). Leave empty if not required. username: '' # The password to use when connecting to Redis. Leave empty if not required. password: '' # The Redis database index to use for cache (default: 1 to separate from messenger/pubsub). database: 1 # Connection pool size for Redis caching operations. pool-size: 10 # Connection and socket timeout in milliseconds. timeout: 2000 # Prefix applied to all cache keys in Redis to avoid collisions. key-prefix: 'nkstaff:cache:'Choosing a Cache Provider
Section titled “Choosing a Cache Provider”CAFFEINE:- Ultra-fast local JVM in-memory caching.
- Ideal for standalone servers or networks that use Redis Pub/Sub for explicit cache invalidation events.
REDIS:- Shared distributed cache.
- Recommended for large networks with multiple proxies where ban or mute checks must reflect globally across all instances without delay.