close closes the catalog cache, flushing any changes to the underlying store.
(ctx context.Context)
| 85 | |
| 86 | // close closes the catalog cache, flushing any changes to the underlying store. |
| 87 | func (c *catalogCache) close(ctx context.Context) error { |
| 88 | err := c.flush(ctx) |
| 89 | c.release() |
| 90 | return err |
| 91 | } |
| 92 | |
| 93 | // flush flushes changes to the underlying store. |
| 94 | // Unlike other catalog functions, it is safe to call flush concurrently with calls to get and list (i.e. under a read lock). |