sourcebans-pp icon indicating copy to clipboard operation
sourcebans-pp copied to clipboard

Game Query Cache

Open CrazyHackGUT opened this issue 7 years ago • 1 comments

Is your feature request related to a problem? Please describe.

Now SourceBans++ queries all servers again and again when we open SB page.

Describe the solution you'd like

I suggest add the query cache. Data may sometimes differ from real data, but the server will deal less with processing SB++ requests. I see two ways for implementing cache:

  • When user requests SB++ page, web checks the relevance of cached data, and if data is too old (saved 30 seconds ago, by example), he requests data again and saves in cache.
  • Plugin sometimes sends data to DB manually (player list (with SteamIDs: this can also solve a problem with status parsing when we add a ban or comm ban from Servers page), current map, hostname, max players slots, etc.).

CrazyHackGUT avatar Aug 13 '18 16:08 CrazyHackGUT

This will be one of them first features that will be worked on after SourceBans++ 1.7.0 releases as a stable version.

I think caching in the webpanel should be enough. Server Queries (responsible for loading more casual data e.g map, hostname, simple player data) could be cached quite agressive (multiple minutes). RCON commands on the other hand mostly serve to deliver misson critical data (e.g when you want to kick a player) so I wouldn't cache that data to agressive (maybe a few seconds not much longer)

Groruk avatar Sep 25 '19 13:09 Groruk