Skip to content

Conversation

@tdstein
Copy link
Collaborator

@tdstein tdstein commented Nov 4, 2024

Removes the cache layer from finder methods to reduce the complexity of propagating query parameters.

When passing query parameters through finder methods, it is difficult to manage the cache if we wish to have it reflect the user's query state. For example, when calling packages.find_by(name='posit-sdk)', what should packages._data return on the next call?

@tdstein tdstein requested a review from schloerke November 4, 2024 17:11
@github-actions
Copy link

github-actions bot commented Nov 4, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
1427 1361 95% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
src/posit/connect/resources.py 94% 🟢
TOTAL 94% 🟢

updated for commit: 0822eea by action🐍

@tdstein
Copy link
Collaborator Author

tdstein commented Nov 4, 2024

Made fetch public as a more verbose way of getting the list. This could also be named aslist or something similar.

@tdstein tdstein marked this pull request as draft November 4, 2024 19:21
@tdstein tdstein marked this pull request as ready for review November 4, 2024 19:30
Copy link
Collaborator

@schloerke schloerke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to explore more of possibly removing the caching layer completely in a followup.

But I like where this is going!

@schloerke schloerke merged commit 1dacc4d into main Nov 4, 2024
33 checks passed
@schloerke schloerke deleted the tdstein/no-cache branch November 4, 2024 20:17
schloerke added a commit that referenced this pull request Nov 4, 2024
* main:
  refactor: removes cache layer from active sequence (#320)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants