mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-01 01:17:13 +00:00
fix(ugc): store meshes compressed, serve LXFML from the database, log client downloads
Each model took about 18 MB (the .nif uncompressed beside its .gz, the unbaked .nif for the dashboard), so the 2 GB cap held about 110 models and the server kept evicting and remaking them while clients got 408s. Only the .gz files are stored now (the dashboard's copies are inflated when asked for), and the previous version keeps only its icon, stats and .nif.gz. The LXFML needs no making: its downloads come from the ugc row (kept in memory for the last few), so they're never waited for or evicted. Every client download is logged with its answer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -57,6 +57,10 @@ public:
|
||||
// Removes the least recently used items until the total is at most `maxBytes`; what was removed
|
||||
std::vector<Entry> Evict(uint64_t maxBytes) const;
|
||||
|
||||
// An item's .nif (`name` model.nif, model.noao.nif or previous.model.nif): stored compressed (<name>.gz), or as it is
|
||||
// (made by older versions); nullopt when there's neither
|
||||
std::optional<std::string> ReadNif(Kind kind, LWOOBJID id, const std::string& name) const;
|
||||
|
||||
// Names the server writes (and serves); anything else is refused
|
||||
static bool IsKnownFile(const std::string& name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user