MCPcopy Index your code
hub / github.com/apache/answer / NewKVOperator

Function NewKVOperator

plugin/kv_storage.go:330–336  ·  view source on GitHub ↗

NewKVOperator creates a new KV storage operator with the specified database engine, cache and plugin name. It returns a KVOperator instance that can be used to interact with the plugin's storage.

(db *xorm.Engine, cache cache.Cache, pluginSlugName string)

Source from the content-addressed store, hash-verified

328// NewKVOperator creates a new KV storage operator with the specified database engine, cache and plugin name.
329// It returns a KVOperator instance that can be used to interact with the plugin's storage.
330func NewKVOperator(db *xorm.Engine, cache cache.Cache, pluginSlugName string) *KVOperator {
331 return &KVOperator{
332 data: &Data{DB: db, Cache: cache},
333 pluginSlugName: pluginSlugName,
334 cacheTTL: 30 * time.Minute,
335 }
336}

Callers 2

setupTestEnvironmentFunction · 0.92
initPluginDataMethod · 0.92

Calls

no outgoing calls

Tested by 1

setupTestEnvironmentFunction · 0.74