-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
api: bigtableIssues related to the Bigtable API.Issues related to the Bigtable API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
Hello!
We'd like to cache Bigtable query results with the Caffeine library, using Query as the cache key. That's difficult to do right now because the Query object is modified when the request is executed. During the call to toProto, the table name and profile ID are set on the ReadRowsRequest builder. This means the Query object has a different hash code after the request executes. So a subsequent request with the exact same query parameters will be a cache miss.
One solution would be to make a copy of the Query object before executing the request, and use that as the cache key. But I don't think it's currently possible to copy a Query object. I've submitted PR #5551 which allows users to copy Query objects.
Metadata
Metadata
Assignees
Labels
api: bigtableIssues related to the Bigtable API.Issues related to the Bigtable API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.