ReloadCachedCollections fetches all collections and caches them into the app store.
()
| 48 | |
| 49 | // ReloadCachedCollections fetches all collections and caches them into the app store. |
| 50 | func (app *BaseApp) ReloadCachedCollections() error { |
| 51 | collections, err := app.FindAllCollections() |
| 52 | if err != nil { |
| 53 | return err |
| 54 | } |
| 55 | |
| 56 | app.Store().Set(StoreKeyCachedCollections, collections) |
| 57 | |
| 58 | return nil |
| 59 | } |
| 60 | |
| 61 | // FindCollectionByNameOrId finds a single collection by its name (case insensitive) or id. |
| 62 | func (app *BaseApp) FindCollectionByNameOrId(nameOrId string) (*Collection, error) { |
no test coverage detected