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

Caching should be based on ontologyRid, not on Client #299

Closed
ericanderson opened this issue May 9, 2024 · 1 comment
Closed

Caching should be based on ontologyRid, not on Client #299

ericanderson opened this issue May 9, 2024 · 1 comment
Assignees
Milestone

Comments

@ericanderson
Copy link
Member

As we implement multiple ontology support, it is expected that syntax will be client(ObjectType, ontologyRid) or client.withOntology(ontologyRid)(ObjectType). In both cases, if we cache by Client then we need to also keep around the rid -> client mapping so we might as well just cache on rid.

@ericanderson
Copy link
Member Author

I'm second guessing this now.

  • Its probably best to just leave it connected to the client so consumers have the most control. For example, they could force a reload of data by replacing their client, something they would not be able to do if we did ontologyRid.
  • Using a second ontology client is likely more natural than client(ObjectType, ontologyRid). Documentation could convey that you should hang onto client.withOntology() (if we build that syntax) but if you don't you just see perf issues.

I think we get the least amount of surprise and the most possibility to do something about it without this.

@ericanderson ericanderson modified the milestones: 2.x, 2.0.0 Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant