1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-25 22:48:36 +00:00

Add obj_cache in session

This commit is contained in:
Heran Yang
2025-03-31 16:17:38 +08:00
parent ee5449e04b
commit 0d0a6f9474
3 changed files with 6 additions and 1 deletions

View File

@@ -31,7 +31,7 @@ seaf_metric_manager_new (struct _SeafileSession *seaf)
mgr->seaf = seaf; mgr->seaf = seaf;
// redis cache // redis cache
mgr->priv->cache = objcache_new (); mgr->priv->cache = seaf->obj_cache;
return mgr; return mgr;
} }

View File

@@ -131,6 +131,8 @@ load_config (SeafileSession *session, const char *config_file_path)
"general", "cloud_mode", "general", "cloud_mode",
NULL); NULL);
session->obj_cache = objcache_new ();
notif_enabled = g_key_file_get_boolean (config, notif_enabled = g_key_file_get_boolean (config,
"notification", "enabled", "notification", "enabled",

View File

@@ -30,6 +30,7 @@
#include "index-blocks-mgr.h" #include "index-blocks-mgr.h"
#include "notif-mgr.h" #include "notif-mgr.h"
#include "http-tx-mgr.h" #include "http-tx-mgr.h"
#include "obj-cache.h"
#include "metric-mgr.h" #include "metric-mgr.h"
#include <searpc-client.h> #include <searpc-client.h>
@@ -99,6 +100,8 @@ struct _SeafileSession {
// For metric // For metric
SeafMetricManager *metric_mgr; SeafMetricManager *metric_mgr;
ObjCache *obj_cache;
gboolean log_to_stdout; gboolean log_to_stdout;
gboolean is_repair; gboolean is_repair;