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)
| 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. |
| 330 | func 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 | } |
no outgoing calls