Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: cache policy callables get passed datastore API Key, not ndb Key #987

Open
snarfed opened this issue Jun 1, 2024 · 0 comments
Open
Labels
api: datastore Issues related to the googleapis/python-ndb API.

Comments

@snarfed
Copy link

snarfed commented Jun 1, 2024

This took me a bit to debug just now, due to an error in the ndb docs, so I figured I'd file this to hopefully prevent that for others in the future. The docs currently say that the context global_cache_timeout_policy and (I think?) global_cache_policy callables get passed a google.cloud.ndb.key.Key, but that's not true. Evidently they actually get passed a google.cloud.datastore.key.Key instead.

Interestingly cache_policy gets passed a google.cloud.ndb.key.Key, which is documented correctly, but only adds to the confusion.

Hope this helps!

@product-auto-label product-auto-label bot added the api: datastore Issues related to the googleapis/python-ndb API. label Jun 1, 2024
snarfed added a commit to snarfed/bridgy-fed that referenced this issue Aug 1, 2024
…f keys

google.cloud.datastore.key.Key or google.cloud.ndb.key.Key. see googleapis/python-ndb#987
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the googleapis/python-ndb API.
Projects
None yet
Development

No branches or pull requests

1 participant