[ https://issues.apache.org/jira/browse/BEAM-13632?focusedWorklogId=713855&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-713855 ]
ASF GitHub Bot logged work on BEAM-13632: ----------------------------------------- Author: ASF GitHub Bot Created on: 24/Jan/22 15:39 Start Date: 24/Jan/22 15:39 Worklog Time Spent: 10m Work Description: AydarZaynutdinov commented on a change in pull request #16493: URL: https://github.com/apache/beam/pull/16493#discussion_r790867248 ########## File path: playground/backend/cmd/server/controller.go ########## @@ -241,22 +241,24 @@ func (controller *playgroundController) Cancel(ctx context.Context, info *pb.Can } // GetPrecompiledObjects returns the list of examples +// - If SDK and category are unspecified in the request, gets the whole catalog from the cache +// - If there is no catalog in the cache, gets the catalog from the Storage and saves it to the cache +// - If SDK or category is specified in the request, gets the specific catalog from the Storage Review comment: It seems that the comment here doesn't match the method logic. The method gets a catalog from the cache in all cases, not only if `SDK and category are unspecified` ########## File path: playground/backend/internal/cache/cache.go ########## @@ -75,4 +79,10 @@ type Cache interface { // SetExpTime adds expiration time of the pipeline to cache by pipelineId. SetExpTime(ctx context.Context, pipelineId uuid.UUID, expTime time.Duration) error + + // SetCatalog adds the given catalog to cache by ExamplesCatalog key. + SetCatalog(ctx context.Context, catalog []*pb.Categories) error + + // GetCatalog return catalog from cache by ExamplesCatalog key. + GetCatalog(ctx context.Context) ([]*pb.Categories, error) Review comment: Why can't we use already existing methods `GetValue` and `SetValue`? Is it because we use `Get`/`Set` for catalog instead of `HGet`/`HSet`? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 713855) Time Spent: 1h 40m (was: 1.5h) > Save catalog data to the cache > ------------------------------ > > Key: BEAM-13632 > URL: https://issues.apache.org/jira/browse/BEAM-13632 > Project: Beam > Issue Type: Sub-task > Components: beam-playground > Reporter: Artur Khanin > Assignee: Artur Khanin > Priority: P2 > Labels: beam-playground-backend > Time Spent: 1h 40m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.20.1#820001)