mirror of
https://github.com/ollama/ollama.git
synced 2026-05-07 00:22:43 -05:00
28 lines
484 B
Go
28 lines
484 B
Go
package server
|
|
|
|
import "context"
|
|
|
|
type modelCaches struct {
|
|
recommendations *modelRecommendationsCache
|
|
show *modelShowCache
|
|
}
|
|
|
|
func newModelCaches() *modelCaches {
|
|
return &modelCaches{
|
|
recommendations: newModelRecommendationsCache(),
|
|
show: newModelShowCache(),
|
|
}
|
|
}
|
|
|
|
func (c *modelCaches) Start(ctx context.Context) {
|
|
if c == nil {
|
|
return
|
|
}
|
|
if c.recommendations != nil {
|
|
c.recommendations.Start(ctx)
|
|
}
|
|
if c.show != nil {
|
|
c.show.Start(ctx)
|
|
}
|
|
}
|