- Deleted obsolete agent API files (agent.go, api.go, api_test.go, types.go) to streamline the codebase. - Refactored the agent loading logic to initialize the API instance correctly, ensuring proper integration with the new structure. - Updated context handling to improve clarity and maintainability across the agent's functionality. - Enhanced error handling and cache management in the agent's initialization process.
11 lines
241 B
Go
11 lines
241 B
Go
package types
|
|
|
|
import "github.com/yaoapp/gou/store"
|
|
|
|
// GetCacheStore get the cache store
|
|
func (dsl *DSL) GetCacheStore() (store.Store, error) {
|
|
if dsl.Cache == "" {
|
|
return store.Get("__yao.agent.cache")
|
|
}
|
|
return store.Get(dsl.Cache)
|
|
}
|