• Blake Mizerany's avatar
    server/internal/client/ollama: hold DiskCache on Registry (#9463) · 3519dd1c
    Blake Mizerany authored
    Previously, using a Registry required a DiskCache to be passed in for
    use in various methods. This was a bit cumbersome, as the DiskCache is
    required for most operations, and the DefaultCache is used in most of
    those cases. This change makes the DiskCache an optional field on the
    Registry struct.
    
    This also changes DefaultCache to initialize on first use. This is to
    not burden clients with the cost of creating a new cache per use, or
    having to hold onto a cache for the lifetime of the Registry.
    
    Also, slip in some minor docs updates for Trace.
    3519dd1c
server.go 6.46 KB