chore: introduce user cache invalidation api (#8129)

* chore: introduce user cache invalidation api

Signed-off-by: shuiyisong <xixing.sys@gmail.com>

* chore: update using plugins hook

Signed-off-by: shuiyisong <xixing.sys@gmail.com>

---------

Signed-off-by: shuiyisong <xixing.sys@gmail.com>
This commit is contained in:
shuiyisong
2026-05-20 21:41:09 +08:00
committed by GitHub
parent 12a4e934f1
commit 28bed396e2
6 changed files with 47 additions and 14 deletions

View File

@@ -14,6 +14,7 @@
use auth::{DefaultPermissionChecker, PermissionCheckerRef, UserProviderRef};
use common_base::Plugins;
use common_meta::cache::CacheRegistryBuilder;
use frontend::error::{IllegalAuthConfigSnafu, Result};
use frontend::frontend::FrontendOptions;
use snafu::ResultExt;
@@ -54,6 +55,11 @@ pub async fn start_frontend_plugins(_plugins: Plugins) -> Result<()> {
Ok(())
}
/// Allows frontend plugins to add cache invalidators to the layered registry.
pub fn configure_cache_registry(_plugins: &Plugins) -> Option<CacheRegistryBuilder> {
None
}
pub mod context {
use std::sync::Arc;

View File

@@ -13,6 +13,7 @@
// limitations under the License.
use common_base::Plugins;
use common_meta::cache::CacheRegistryBuilder;
use common_meta::kv_backend::KvBackendRef;
use standalone::error::Result;
use standalone::options::StandaloneOptions;
@@ -34,6 +35,11 @@ pub async fn start_standalone_plugins(_plugins: Plugins) -> Result<()> {
Ok(())
}
/// Allows standalone plugins to add cache invalidators to the layered registry.
pub fn configure_cache_registry(_plugins: &Plugins) -> Option<CacheRegistryBuilder> {
None
}
pub mod context {
use std::sync::Arc;