YL Priv cache

Description

yl_privcache 🔗

Purpose 🔗

This mod adds a cache for privileges. priv lookup is very expensive, because it selects from the database each time. With a cache for privileges, this lookup is sped up by x100 approximately.

Download 🔗

Get it from https://gitea.your-land.de/your-land/yl_privcache

Installation 🔗

  1. Copy the "yl_privcache" folder to your mod directory.
  2. Enable the mod in your world.mt file.

Configuration 🔗

yl_privcache.debug = false

Set to true to enable debug mode

yl_privcache.reload_interval = 607.31

Set to the interval at which the cache will refresh itself from database

yl_privcache.reload_enabled = false

Set this to true to enable periodical reloads.

yl_privcache.admin_priv = "server"

Admin priv allows using the start and stop chatcommands and reload for other than self

Usage 🔗

This mod targets servers, but should work in singleplayer, too.

Chatcommands 🔗

/privcache_reload [*|playername]

Reloads privs for everyone when given * or playername when given playername or oneself without param.

/privcache_stop

Disables the priv cache until it is enabled again

/privcache_start

Enables the priv cache until it is disabled

Limitations 🔗

  • If the privs on the database are altered by an external force, the ingame cache is out of sync.
  • The ingame cache may be out of sync and incorrect until a reload per chatcommand or reload_interval setting.

Alternatives 🔗

  • Keep database lookup

Supported versions 🔗

If you use yl_privcache, but something is wrong, please file a bug. PRs also welcome.

There is no reason to believe it doesn't work anywhere, but you never know.

Allied projects 🔗

If you know a project that uses this mod tell us and we will add it to the list.

Uninstall 🔗

Remove it from your mod folder or deactivate it in your world.mt

Mods that depend on it will cease to work, if the mod is removed without proper replacement.

License 🔗

See LICENSE.md

  • Code MIT AliasAlreadyTaken
  • Screenshot CC0 Styxcolor

Thank you 🔗

  • The terrible priv implementation
  • whosit who did the heavy lifting

Reviews

Review

Do you recommend this mod?

  • No reviews, yet.

Releases

v1.0.1

Download

Luanti 5.0+

2026-07-29 15:00 UTC

v1.0.1 🔗

No release notes

All releases

Information

Provides

yl_privcache

Dependencies

Required
No required dependencies

Information

Type
Mod
Technical Name
yl_privcache
Languages
English
License
MIT for code,
CC0-1.0 for media.
Maintenance State
Maintenance Only
Added
2026-07-29 14:59 UTC
Maintainers
AliasAlreadyTaken