Skip to content

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

Open
@snarfed

Description

@snarfed

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: datastoreIssues related to the googleapis/python-ndb API.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions